Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Complie Error

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




*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Complie Error

Check the Property setting for any buttons on sthe heet and change the
setting for TakeFocusOnClick to equal False


---
Message posted from http://www.ExcelForum.com/

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 550
Default Complie Error

Duplicate post..see previous.


"chris huber" wrote in message
...
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




*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 208
Default Complie Error

Hi
This is a copied reply of Tom Ogilvy's to a similar problem - hope he doesn't mind!
"Hopefully it is just an errant reference which was inhereted from the
configuration you used when you built the file. If so, they just need to go
to the VBE (alt-F11) then in the menu go to Tools=References. Any item
which is checked and shown as MISSING should be unchecked. If it is not
needed, this should clear up the problem. If not, then it should show you
what necessary items are not available and you can go about creating
references to them.

HTH,
Tom Ogilvy

PS - if there were unnecessary items causing the problem, go to your
original file and uncheck these items on your machine. Then make a change
on the worksheet or in your code and save the file (sometimes unchecking an
unnecessary reference is not a change that is detected)."

regards
Paul
chris huber wrote in message ...
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".

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Counting instances of found text (Excel error? Or user error?) S Davis Excel Worksheet Functions 5 September 12th 06 04:52 PM
How to fix "complie error:procedures" in Excel? Cris Liu Excel Discussion (Misc queries) 4 June 27th 06 11:48 PM
Error 50290: Error writing to Worksheet while using an ActiveX Control emblair3 Excel Programming 3 February 24th 04 06:03 PM
Variable produces a complie error Btinker Excel Programming 1 November 26th 03 07:53 PM


All times are GMT +1. The time now is 06:40 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"