How do you prevent certain parts of a macro from running?
I realize if you apply an ' it will prevent that line form running. whats an easy way of preventing multiple lines from running?
How do you prevent certain parts of a macro from running?
I realize if you apply an ' it will prevent that line form running. whats an easy way of preventing multiple lines from running?
Use a compiler directive:
![]()
Please Login or Register to view this content.
Or Right click the gray toolbar > select Customise > Commands Tab > Edit > select comment block and drag to the toolbar > repeat the same for Unblock
Then select the Lines to comment out and press the button
VBA Noob
_________________________________________
![]()
![]()
Credo Elvem ipsum etian vivere
_________________________________________
A message for cross posters
Please remember to wrap code.
Forum Rules
Please add to your signature if you found this link helpful. Excel links !!!
Perfect. thats what I am talking about!
Thank you both.
While I have you, how would I do this:
I have Excel files that are the results of several different selection criteria from a database. Each file is named differently and the tabs are named different also. I currently have to save the file to a standard naming convention and change the tab name before I can run the macro.
I would like to be able to just run the macro (with the additional code ) and let it do the name assigning itself?
Any help would be most helpful. Please use laymen’s terms as I am not an expert in VB. For ex; how to actually word it in the macro.
That's unrelated to this thread's topic. Please start a new one.
But I didn't understand a reply and thought it might help to get additional eyes?
Then continue in that thread, please.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks