C
chris huber
I created a master template file that utilizes vlookups to pull in data
from a data file. On the master template, I have some macros, two of
which are used to hide and unhide columns.
After running the data into the master (i.e. with the vlookups), I get
40 'custom' files which I emailed out to my coworkers who are NOT on the
same network. (I mention this because all of the macros work just fine
on dozens of computers within my office).
The error occurs when they open the file and try to click the Unhide
Columns button/macro. The error reads:"Compile error in hidden module:
Module 2". I discovered that this error is due to the fact that I
protected the VB script. So I unprotected the script in the VB editor
which leads to the following error: "Compile error: can't find project
of library."
At this point, the debugger highlights the word "Password" in the line
with Password = "bobbob". Here is the entire macro:
Sub UnhideComment()
'
' UnhideComment Macro
' Macro recorded 12/11/2003 by CMH
'
'
Sheets("Office").Select
ActiveSheet.Unprotect Password:="bobbob"
Columns("e:g").Select
Range("f1").Activate
Selection.EntireColumn.Hidden = False
Range("c3").Select
Password = "bobbob"
ActiveSheet.Protect Password, DrawingObjects:=True, Contents:=True,
Scenarios:=True
End Sub
YOUR HELP IS VERY MUCH APPRECIATED ... and badly needed!!
Thanks,
Chris
from a data file. On the master template, I have some macros, two of
which are used to hide and unhide columns.
After running the data into the master (i.e. with the vlookups), I get
40 'custom' files which I emailed out to my coworkers who are NOT on the
same network. (I mention this because all of the macros work just fine
on dozens of computers within my office).
The error occurs when they open the file and try to click the Unhide
Columns button/macro. The error reads:"Compile error in hidden module:
Module 2". I discovered that this error is due to the fact that I
protected the VB script. So I unprotected the script in the VB editor
which leads to the following error: "Compile error: can't find project
of library."
At this point, the debugger highlights the word "Password" in the line
with Password = "bobbob". Here is the entire macro:
Sub UnhideComment()
'
' UnhideComment Macro
' Macro recorded 12/11/2003 by CMH
'
'
Sheets("Office").Select
ActiveSheet.Unprotect Password:="bobbob"
Columns("e:g").Select
Range("f1").Activate
Selection.EntireColumn.Hidden = False
Range("c3").Select
Password = "bobbob"
ActiveSheet.Protect Password, DrawingObjects:=True, Contents:=True,
Scenarios:=True
End Sub
YOUR HELP IS VERY MUCH APPRECIATED ... and badly needed!!
Thanks,
Chris