Results 1 to 9 of 9

Thread: Macro buttons are gone after downloading workbook from website
Thanks Thanks: 0 Likes Likes: 0

  1. #1
    New Member
    Join Date
    Jul 2019
    Posts
    5
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Macro buttons are gone after downloading workbook from website

    We use an online database system that we created for our company. I create Excel workbooks for entering data and generating certificates. The workbooks have several buttons on several worksheets that are used to navigate through the worksheets and for running various macros in the workbook. Once i create the Excel workbooks, i save them (as macro-enabled workbooks of course) and then upload them to our database online. When we need to use the workbooks, we can download the file from our website. The file downloads and opens up as a macro enabled workbook and all the macros are there. However, all the buttons to run the macros are gone. I made sure that in the File/Options/Advanced/Display Options for this Workbook settings the "ALL" is checked for "For Objects, Show:" when the file is downloaded but the buttons are not there regardless. What is causing the buttons to disappear when downloading the workbook? How can i prevent this from happening so that i can have the buttons in the downloaded workbook to run the macros?

  2. #2
    Board Regular Kyle123's Avatar
    Join Date
    Jan 2012
    Location
    Leeds, UK
    Posts
    2,641
    Post Thanks / Like
    Mentioned
    10 Post(s)
    Tagged
    2 Thread(s)

    Default Re: Macro buttons are gone after downloading workbook from website

    What type of buttons are you using?

  3. #3
    New Member
    Join Date
    Jul 2019
    Posts
    5
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Macro buttons are gone after downloading workbook from website

    I am using a mix. This is a few years in the making so I've learned a lot along the way. I started with shapes and used a rectangle that i assigned a macro to. I also have used Active X Command Buttons and Form Control buttons. I have all three in this particular workbook and neither of them are there after downloading the workbook from our website.

  4. #4
    Board Regular BlakeSkate's Avatar
    Join Date
    Jan 2015
    Location
    Pernsylvoonia
    Posts
    460
    Post Thanks / Like
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Macro buttons are gone after downloading workbook from website

    are the macros themselves gone or just the buttons?
    it sounds like someone flubbed your file so you may want to keep a personal backup.
    have you tried recreating these buttons and re-uploading the file to your database?
    -------------------------------------------------------------------------------
    I may not give the best VBA codes, but they sure are VBA codes.
    Help me help you by posting a snapshot of your data & your expected result
    Please use [ code][ /code] tags when posting VBA as well as proper indentation

  5. #5
    New Member
    Join Date
    Jul 2019
    Posts
    5
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Macro buttons are gone after downloading workbook from website

    All the macros are there and will run normally. I keep all the files on my computer and have tried uploading them with all different kinds of button types or images to click on to run the macros. I've uploaded dozens of files trying to find something that will still be there when i download it from the website. But nothing works.

  6. #6
    Board Regular BlakeSkate's Avatar
    Join Date
    Jan 2015
    Location
    Pernsylvoonia
    Posts
    460
    Post Thanks / Like
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Macro buttons are gone after downloading workbook from website

    images in excel have never been reliable for me. have you tried making cells that you double click to trigger macros? thats what i do, but some don't like that method.

    Code:
    Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
    
    If Target.Address = "$D$2" Then
    
    'DO WHAT YOU WANT HERE
    
    End If
    End Sub
    this is the code that you would paste in a sheet to make specific cells double-clickable to perform an action
    so just run the macro in one of these bad boys and cell D2 will act as a button
    then you'll never have to worry about shapes, images, or activex things/properties.
    -------------------------------------------------------------------------------
    I may not give the best VBA codes, but they sure are VBA codes.
    Help me help you by posting a snapshot of your data & your expected result
    Please use [ code][ /code] tags when posting VBA as well as proper indentation

  7. #7
    New Member
    Join Date
    Jul 2019
    Posts
    5
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Macro buttons are gone after downloading workbook from website

    Very interesting idea. I tried this out and perhaps i'm doing it wrong but i ran into a couple issues. I have all the worksheets protected to keep people from changing formulas in the cells. When i double clicked in the cell i was trying to use a button, it told me that cell i was trying to change was protected. So i unprotected that cell and tried again. This time, it just put the cursor in the cell and did not run the macro. I put the Private Sub in the module that contains the macros for the worksheet is was trying this on. Is that correct place to put that? What am i missing here?

  8. #8
    Board Regular MARK858's Avatar
    Join Date
    Nov 2010
    Location
    Southern England
    Posts
    11,063
    Post Thanks / Like
    Mentioned
    1 Post(s)
    Tagged
    2 Thread(s)

    Default Re: Macro buttons are gone after downloading workbook from website

    Run the code below from a regular module, does your other sub now work?

    Code:
    Sub events()
    Application.EnableEvents = True
    End Sub
    Test VBA on a copy of your data (remember you can't normally reverse the action)

    Please follow the forum Rules and Guidelines & please use Code tags around your code i.e. [CODE]your code[/CODE]

    To post a screenshot try one of these links
    MrExcel HTML Maker, RoryA addin (Win & Mac) or Borders-Copy-Paste

  9. #9
    New Member
    Join Date
    Jul 2019
    Posts
    5
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Macro buttons are gone after downloading workbook from website

    I must be doing something wrong. That didn't work either. But i did come up with a solution. I created another macro with a shortcut key of Ctrl+w that adds a whole bunch of form control buttons and check boxes on each worksheet and assigns the appropriate macro to each button. When the worksheet is downloaded from the website, i hit Ctrl+w and it runs this macro which puts all my buttons and check boxes where they need to be and we are back in business. I'm going to keep playing with this double click idea because i really like that. But at least i found a solution. Thanks for the help.

Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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