CHARLESJOSEPH
New Member
- Joined
- Jul 31, 2008
- Messages
- 13
First post: Very adept at Excel functionality but total newbie to VB so please forgive my retardedness.
All I want to do is simply have a macro run when the spreadsheet is printed. I have been researching the board for the past couple hours but still can't figure it out. I have seen examples of the Before_Print function in many posts but can't seem to get it to work. I've read that the code must be inserted in the "thisworkbook module" but I can't seem to find it. When I view the VB code, all I have to choose from is "general" tab or "worksheet" tab. My code is attached.
The other question I have is if there is a way to apply VB code to the whole workbook (I am assuming there is and it is probably on the elusive "thisworkbook module.") Please someone put me out of my misery.
PS: If anyone knows of a good introductory / overview of VB for idiots, please let me know. Thanks.
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-comfficeffice" /><o> </o>
Sub Hidezero()<o></o>
For Each cell In Range("C:C")<o></o>
If cell.Value = "0" Then cell.EntireRow.Hidden = True<o></o>
Next cell<o></o>
End Sub
<o> </o>
<o> </o>