+ Reply to Thread
Results 1 to 6 of 6

Cannot find the VBA code for the "RESTORE" button

  1. #1
    Registered User
    Join Date
    11-08-2017
    Location
    USA
    MS-Off Ver
    2016
    Posts
    5

    Cannot find the VBA code for the "RESTORE" button

    Hi,

    I need to update an Excel spreadsheet with VBA code written by someone else that I don't know. There is a button (as Textbox rather than Commandbutton) where I click then all the values in the Excel will be restored to the defaults. I opened the Developer tab and clicked Design mode, then "View code". Surprisingly I cannot see the code. There has to be some code assigned to this button (or Textbox) so that clicking on it restores the defaults. What's more surprising is that I found the macro code for restoring defaults, but didn't see how the code is connected to this button (or Textbox). Could any of you tell me where I can identify the association between this button and the code?

    Thanks!

  2. #2
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Cannot find the VBA code for the "RESTORE" button

    What kind of textbox is it? If you right-click it, do you seen an Assign Macro option?
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  3. #3
    Registered User
    Join Date
    11-08-2017
    Location
    USA
    MS-Off Ver
    2016
    Posts
    5

    Re: Cannot find the VBA code for the "RESTORE" button

    Dear xlnitwit,

    This is just a plain textbox. The property of this textbox is strange too (please see the picture attached), as it's shown as Sheet1 instead of the name "Textbox 33".

    I right-clicked it and was able to see an Assign Macro option, which when I clicked and saw all macros contained in the Excel, but still can't tell how the code for restoring defaults is tied to this textbox.

    Capture.PNG

  4. #4
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Cannot find the VBA code for the "RESTORE" button

    If you right-click and choose 'Assign macro', is there a macro pre-populated in the top of the macros dialog?

  5. #5
    Registered User
    Join Date
    11-08-2017
    Location
    USA
    MS-Off Ver
    2016
    Posts
    5

    Re: Cannot find the VBA code for the "RESTORE" button

    Dear xlnitwit,

    Yes, I can see a macro pre-populated in the top. How come I missed that?! You are awesome, my problem is solved!

    Thank you so much!

  6. #6
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Cannot find the VBA code for the "RESTORE" button

    You're welcome, and thanks for the rep.

+ 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. Replies: 2
    Last Post: 07-24-2017, 02:19 AM
  2. Button that makes the "Find and Replace" popup come up when pressed.
    By fred80213 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-12-2013, 01:54 PM
  3. programming code in macro "to find other excel" by clicking a button
    By sanjeev devaliya in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 05-25-2013, 12:11 PM
  4. Replies: 0
    Last Post: 12-10-2012, 04:34 AM
  5. creating "Find" button on userform for editing data
    By madhg in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-11-2009, 04:35 AM
  6. Replies: 5
    Last Post: 06-26-2006, 09:23 PM
  7. save and restore "Workbook Menu Bar" & "Cell" menus
    By Jeff Higgins in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-13-2005, 10:08 PM

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