+ Reply to Thread
Results 1 to 4 of 4

Failed Macro

  1. #1
    Registered User
    Join Date
    05-22-2022
    Location
    Texas City, TX
    MS-Off Ver
    2016
    Posts
    30

    Failed Macro

    I have a spreadsheet where I'm inserting 3 command buttons, one on 3 different sheets.
    The command buttons will reset the entered data once the reopen the workbook

    I ran into a problem on the 2nd sheet, everything works fine on the 1st sheet
    Sheet 1 is called Operator
    Sheet 2 is called Forklift Operator
    Sheet 3 is called Maintenance

    I'm using a command button because my knowledge of macros/vba is weak and I couldn't figure out how to code it to reset the workbook after closing.

    I tried to attach a photo but it failed, it was only 8mb

    Instead, here's a quick example from the excel spreadsheet...

    In the left column, under VBA Project (Daily Work Sheet.xlsm)

    Microsoft Excel Objects

    Sheet 1 (Operator)
    Daily Work Sheet.xlsm - Sheet1 (Code)
    Reset and Click
    Private Sub Reset_Click()
    then the coding

    Sheet 2 (Forklift Operator)
    Daily Work Sheet.xlsm - Sheet2 (Code)
    General and Reset_Click
    Private Sub Reset_Click()
    then the coding

    Note: I'm unable to change the Reset and Click and the General and Reset_Click
    Sheet 1 works perfectly, Sheet 2 generates a message that says The Macro may not be available in this workbook

    If you have any ideas, let me know
    Thanks
    Brian

  2. #2
    Valued Forum Contributor ranman256's Avatar
    Join Date
    07-29-2012
    Location
    Kentucky
    MS-Off Ver
    Excel 2003
    Posts
    1,171

    Re: Failed Macro

    macros could be disabled.
    macros are erased in .xlsx files.
    check TRUST CENTER settings.

  3. #3
    Registered User
    Join Date
    05-22-2022
    Location
    Texas City, TX
    MS-Off Ver
    2016
    Posts
    30

    Re: Failed Macro

    all Macros are enabled according to the Trust Center Settings

    just tested the macro in the operator worksheet and it works perfectly
    tested in the forklift worksheet and it cannot run the macro

  4. #4
    Registered User
    Join Date
    05-22-2022
    Location
    Texas City, TX
    MS-Off Ver
    2016
    Posts
    30

    Re: Failed Macro

    The problem was due to a coding error.

    Please delete this thread, until then I will mark it resolved.

+ 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. Calling naother macro in Sub Procedure failed
    By chetanhm in forum Excel Programming / VBA / Macros
    Replies: 33
    Last Post: 11-25-2020, 06:08 AM
  2. [SOLVED] Excel Macro: Last Row Failed to Capture
    By arnel_10 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-15-2017, 07:30 PM
  3. [SOLVED] Paste Method of Worksheet Class Failed for simple macro
    By nikwriter in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-20-2016, 12:32 PM
  4. Passed or Failed, I Failed at excel.
    By jschavo in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-04-2016, 09:42 PM
  5. Macro failed to copy and paste data range
    By pjbassdc in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-02-2011, 07:36 PM
  6. Macro failed in transfer to VB code
    By gary pruett in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-24-2011, 02:24 AM
  7. Group Method failed in macro
    By Ivan in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-03-2005, 02: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