Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Auto_open and environ variable error cannot find library

Hi,

Sub auto_open()
Dim msg
msg = "UserName" & vbTab & Environ("username") & vbNewLine _
& "UserProfile" & vbTab & Environ("UserProfile") & vbNewLine _
& "Computer #" & vbTab & Environ("ComputerName") & vbNewLine _
& "Logon Server" & vbTab & Environ("Logonserver") & vbNewLine _
& "UserDomain " & vbTab & Environ("UserDomain")
MsgBox msg, , "Environment Variables"
End Sub

On some computers, this macro works just fine. on some others, it will
generate an error "Cannot find project or library".
On the computers where the error is raised, this code will work if it is not
on the auto_open() macro.
The computers are equiped with Windows XP Pro and Excel XP or 2003, the bug
happen with both versions of Excel..
Strangely enough, so far the bug happen only with computers located in
France, even if they are equiped with english versions of os and office.
Users in the Americas, Japan, Asia and Eastern Europe seems not to have this
bug. Nobody mentioned it.

At that point I really do not know where to look at. Disk image used in
France? Version of anti-virus software? and what could I do to avoid the
bug.
I tried to add a 2 seconds wait time at the begining of the Auto_Open()
since this is sometimes needed when you open files from SharePoint Portal
2003 through http, but in that case, it does not address the problem.

FYI, I use this macro to manipulate an OLAP connection string to switch
between tcp and http according to the user domain.

Thank you for any comment
Philippe


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 68
Default Auto_open and environ variable error cannot find library

I have not been able to emulate a the error so it is difficult to detect!

Have you tried putting this code into the workbook_open event?

or maybe it's a French thing (only kidding ;-)

Cheers
Nigel

"Philippe Cand" wrote in message
news:9r42c.12866$Zp.8402@fed1read07...
Hi,

Sub auto_open()
Dim msg
msg = "UserName" & vbTab & Environ("username") & vbNewLine _
& "UserProfile" & vbTab & Environ("UserProfile") & vbNewLine _
& "Computer #" & vbTab & Environ("ComputerName") & vbNewLine _
& "Logon Server" & vbTab & Environ("Logonserver") & vbNewLine _
& "UserDomain " & vbTab & Environ("UserDomain")
MsgBox msg, , "Environment Variables"
End Sub

On some computers, this macro works just fine. on some others, it will
generate an error "Cannot find project or library".
On the computers where the error is raised, this code will work if it is

not
on the auto_open() macro.
The computers are equiped with Windows XP Pro and Excel XP or 2003, the

bug
happen with both versions of Excel..
Strangely enough, so far the bug happen only with computers located in
France, even if they are equiped with english versions of os and office.
Users in the Americas, Japan, Asia and Eastern Europe seems not to have

this
bug. Nobody mentioned it.

At that point I really do not know where to look at. Disk image used in
France? Version of anti-virus software? and what could I do to avoid the
bug.
I tried to add a 2 seconds wait time at the begining of the Auto_Open()
since this is sometimes needed when you open files from SharePoint Portal
2003 through http, but in that case, it does not address the problem.

FYI, I use this macro to manipulate an OLAP connection string to switch
between tcp and http according to the user domain.

Thank you for any comment
Philippe






----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! 100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Auto_open and environ variable error cannot find library

You may want to have the people with the problem look for missing references.

Next time it happens, have them open the VBE (alt-f11)
then hit ctrl-R to highlight the project
Then tools|references

Have them scroll through that list looking for MISSING.

If they find it, they can report back to you what one it is. If it's not
important to the project, then you could remove the reference in your copy, save
and resend.

If that doesn't work, maybe reregistering excel on the problem pc's will help:

Have them close excel,
then:
Windows Start Button|Run
excel /unregserver
then
Windows Start Button|Run
excel /regserver

The /unregserver & /regserver stuff resets the windows registry to excel's
factory defaults.


Philippe Cand wrote:

Hi,

Sub auto_open()
Dim msg
msg = "UserName" & vbTab & Environ("username") & vbNewLine _
& "UserProfile" & vbTab & Environ("UserProfile") & vbNewLine _
& "Computer #" & vbTab & Environ("ComputerName") & vbNewLine _
& "Logon Server" & vbTab & Environ("Logonserver") & vbNewLine _
& "UserDomain " & vbTab & Environ("UserDomain")
MsgBox msg, , "Environment Variables"
End Sub

On some computers, this macro works just fine. on some others, it will
generate an error "Cannot find project or library".
On the computers where the error is raised, this code will work if it is not
on the auto_open() macro.
The computers are equiped with Windows XP Pro and Excel XP or 2003, the bug
happen with both versions of Excel..
Strangely enough, so far the bug happen only with computers located in
France, even if they are equiped with english versions of os and office.
Users in the Americas, Japan, Asia and Eastern Europe seems not to have this
bug. Nobody mentioned it.

At that point I really do not know where to look at. Disk image used in
France? Version of anti-virus software? and what could I do to avoid the
bug.
I tried to add a 2 seconds wait time at the begining of the Auto_Open()
since this is sometimes needed when you open files from SharePoint Portal
2003 through http, but in that case, it does not address the problem.

FYI, I use this macro to manipulate an OLAP connection string to switch
between tcp and http according to the user domain.

Thank you for any comment
Philippe


--

Dave Peterson

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
Compile error: Can't find project or library Melanie New Users to Excel 14 August 21st 09 02:54 AM
Can't Find Project or Library Error Vick Excel Discussion (Misc queries) 1 May 17th 08 12:25 PM
can't find project or library - error Chris T-M New Users to Excel 4 January 18th 07 10:23 PM
help with this error-Compile error: cant find project or library JackR Excel Discussion (Misc queries) 2 June 10th 06 09:09 PM
Compile Error! Can't find project or Library --- Help! Suh Suk Ho Excel Programming 2 July 21st 03 08:26 PM


All times are GMT +1. The time now is 05:14 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"