+ Reply to Thread
Results 1 to 9 of 9

Combining separate button functions into one toggle button 2011 office for mac

  1. #1
    Registered User
    Join Date
    05-12-2015
    Location
    Birmingham
    MS-Off Ver
    2011
    Posts
    12

    Combining separate button functions into one toggle button 2011 office for mac

    Hello,

    I have built a spreadsheet with a "start" button and a "stop" button that places a timestamp in a column for start time and a column for stop time.
    All im wanting to do is combine these buttons into a toggle button that will display "start" and once clicked display "stop" and carry out the functions i've set the individual buttons to do already.

    Im not sure if i need to use a certain type of button or wether i need to use active x (ive read this somewhere but have no idea how to access it)

    I am using 2011 office for mac if that makes a difference.

    Here is what i have already
    Any help is much appreaciated.

    TIMESHEET.xlsm

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Combining seperate button functions into one toggle button 2011 office for mac

    See attached. I have replaced your buttons with an ActiveX togglebutton. The code is in the worksheet module. Comments explain what is going on. I commented out one of your Subs because it has undeclared variables and wasn't being used. I also moved your start and stop macros into the worksheet module, since they are specific to that worksheet.

    I do not have access to a Mac for testing but in theory it doesn't make a difference.
    Attached Files Attached Files
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    05-12-2015
    Location
    Birmingham
    MS-Off Ver
    2011
    Posts
    12

    Re: Combining seperate button functions into one toggle button 2011 office for mac

    Hi Jeff!

    Thank you for your quick response!

    Theoretically should this be functional now or is there something i need to change?
    The reason i ask is because it will not let me press the button.

    Maybe active x controls are not compatible with mac ?

  4. #4
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,628

    Re: Combining separate button functions into one toggle button 2011 office for mac

    Or try your own procedure (and form button - not ActiveX control) - only slightly modified:
    Please Login or Register  to view this content.
    (Also not Mac tested).
    Attached Files Attached Files
    Best Regards,

    Kaper

  5. #5
    Registered User
    Join Date
    05-12-2015
    Location
    Birmingham
    MS-Off Ver
    2011
    Posts
    12

    Re: Combining separate button functions into one toggle button 2011 office for mac

    Quote Originally Posted by Kaper View Post
    Or try your own procedure (and form button - not ActiveX control) - only slightly modified:
    Please Login or Register  to view this content.
    (Also not Mac tested).


    oh yeaaah!
    That's finally working!

    Thanks a lot both of you, this will save my company so much time and effort, very much appreciated

  6. #6
    Registered User
    Join Date
    05-12-2015
    Location
    Birmingham
    MS-Off Ver
    2011
    Posts
    12

    Re: Combining separate button functions into one toggle button 2011 office for mac

    Having said that when i re-save the file it stops the macros working, do i need to save it with a different file type or something?

  7. #7
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Combining separate button functions into one toggle button 2011 office for mac

    You started with a .xlsm file type and that is what you need. This should work just the same as your original. Do you still have macros enabled?

  8. #8
    Registered User
    Join Date
    05-12-2015
    Location
    Birmingham
    MS-Off Ver
    2011
    Posts
    12

    Re: Combining separate button functions into one toggle button 2011 office for mac

    Thanks, i figured it out, i was trying to save the file as '**timesheet' in order to keep it at the top in our folder but excel didnt like it.

  9. #9
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Combining separate button functions into one toggle button 2011 office for mac

    If your question has been answered please mark your thread as "Solved" so that members will know by looking at the thread title that your problem is solved. Go to the menu immediately above your first post to the thread and click on Thread Tools. From the dropdown menu select "Mark this thread as solved..."

    If a member helped you solve your problem, consider adding to their reputation by clicking on the star icon below their name.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Toggle Button on Workbook Open - value is True but button not pressed?
    By excelnat in forum Excel Programming / VBA / Macros
    Replies: 19
    Last Post: 07-03-2014, 11:23 AM
  2. Replies: 1
    Last Post: 02-13-2014, 10:55 PM
  3. [SOLVED] Linking together an Options Button and a command button inorder to load separate forms
    By emilyloz in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-23-2013, 02:10 PM
  4. [SOLVED] Toggle Button & getting the postion of the just pressed button
    By NugentS in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-12-2012, 11:58 AM
  5. Adding .xla button for Toggle Calculation Button
    By Mike in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-19-2005, 09:05 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1