How do you go back and fix your deviant code?

javajoe

Board Regular
Joined
Nov 7, 2005
Messages
78
Hey guys, this thread is awesome. I recently implemented the dynamic Conditional Formatting to white text (=IF($A$1=$A$1,TRUE,FALSE) - my favorite prank of all... also if you share the workbook then that menu option isn't available so it's even harder to debug), a random msg pop, swapping icons on the toolbar, auto-correcting someone's name to be misspelled, and a number of others. I'm a noob with VBA however, so my question is this:

When you put code such as the following in the Sub Workbook_Open() and then disable the macro prompt on their machine so it doesn't give them the option of running macros, how you do go back to change/remove the code at a later time? Sorry for my ignorance but I'm actually learning quite a bit through this thread and forum!

Private Sub Workbook_Open()
Application.DisplayAlerts = False
Application.Quit
End Sub

Thanks for your help,

- dv
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Sorry... this was supposed to go in the Good Excel Practical Jokes, Pranks, Mean Tricks, etc. thread... feel free to move as appropriate.
 
Unfortunately we can't merge posts into threads, but you're still in the "Lounge" so everything seems fine to me :)
 
Set security to high (or very high) and assuming you didn't digitally sign the workbook; it wouldn't run. (I thought you could also hold down the SHIFT key and double click the file from Win Explorer. But I just tested that and the _open macro still fired for me.)
 
Okay that makes sense... but how do you change the security setting to high if that is done from inside Excel.... (Tools/Marcro/Security...), and every time you lauch the app our deviant code shuts it down?

Is there a way to change the security setting outside of Excel?
 
Open Excel--not the file--and change the security settings. *Then* open the file.

Greg:
(I thought you could also hold down the SHIFT key and double click the file from Win Explorer. But I just tested that and the _open macro still fired for me.
I think that only works if you open the file through Excel (File/Open...)
 
Okay, got it.... so the trick would be to place that code in a specific workbook and not XLSTART.
 
Ok, now I'm confused. I thought you were talking about this only on one file in the first place.

The code I'm assuming is in one particular workbook.

XLSTART is just a folder. Any files you put there will open when you start Excel. Remove the file(s) from that folder, they don't open when Excel starts.
 
...I think that only works if you open the file through Excel (File/Open...)
-von pookie

Yes, it does work there. Both File | Open... and picking it off the File | (recent files list) but I would have sworn it also worked when opening via WinExplorer. Guess my memory is corrupted yet again. Shame I can't defrag my brain...

<hr />

Joe,

KC? Whereabouts? I'm up north not too far from KCI.
 

Forum statistics

Threads
1,222,729
Messages
6,167,880
Members
452,152
Latest member
PinHeads

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top