Clear VBA Code without opening file

sky1in5

Active Member
Joined
Dec 24, 2012
Messages
396
Hi,

can i clear VBA code in a workbook without opening it? need some experts help on it. Thank you.
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Hi,

Could you elaborate on your underlying objective ...?

You can manipulate VBA code on password-free workbooks you can open ...

HTH
 
Upvote 0
Hi,

Could you elaborate on your underlying objective ...?

You can manipulate VBA code on password-free workbooks you can open ...

HTH

objective is to clear my worksheet vba code without even opening that worksheet. i need to clear vba but i do not want to open the worksheet because the code is inside thisworkbook as shown below, if open, my data will changed. i do not want to change the data.

Code:
Private Sub Workbook_Open()
'My CODING
End Sub
 
Upvote 0
Sounds like a one-off job, so just hold down the Shift key while opening the file. (Make a copy of your file first just in case)

The other option is to disable macros before opening the file.
 
Upvote 0
Sounds like a one-off job, so just hold down the Shift key while opening the file. (Make a copy of your file first just in case)

The other option is to disable macros before opening the file.

thanks peter, disable macro works.
 
Upvote 0
thanks peter, disable macro works.
I think you would find the other method does too, and is simpler to implement. :)
Did you give it a try?
Anyway, the main thing is you appear to have a solution.
 
Upvote 0
I think you would find the other method does too, and is simpler to implement. :)
Did you give it a try?
Anyway, the main thing is you appear to have a solution.

holding down the shift does not work for me, haha. it really save me alot work for this. thanks. :)
 
Upvote 0
holding down the shift does not work for me, haha.
Hmm, are you opening the file from within Excel by File > Open or using the recently used file list?
That is, not from Windows Explorer.

See descriptions from Microsoft MVP Jan Karel Pieterse for Excel versions 2010, 2007 and 2003.
 
Upvote 0
Hmm, are you opening the file from within Excel by File > Open or using the recently used file list?
That is, not from Windows Explorer.

See descriptions from Microsoft MVP Jan Karel Pieterse for Excel versions 2010, 2007 and 2003.

okay it work, you need to open via file dialog inorder to use the shift method. thank you. :)
 
Upvote 0

Forum statistics

Threads
1,214,541
Messages
6,120,110
Members
448,945
Latest member
Vmanchoppy

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