Forum Discussion

TheNeedsOfMany's avatar
TheNeedsOfMany
Copper Contributor
Sep 08, 2023
Solved

Error when saving macro workbook as non-macro VBA

I'm trying to create a button on a sheet that allows for a non-macro enabled copy of a sheet to be saved via VBA. I feel like I am 90% of the way there, and have it set up so that the copy is being d...
  • HansVogelaar's avatar
    HansVogelaar
    Sep 08, 2023

    TheNeedsOfMany 

    It might be that strFile is too long (the maximum length of a sheet name is 31), or that it contains characters that aren't allowed in a sheet name: \ , / , * , ? , : , [ , ].

    When the code is paused, press Ctrl+G to activate the Immediate window, type

     

    ? strFile

     

    and press Enter.

Resources