LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 516
Default Error in Workbook_Open

Hello,

I have an excel file that I get as an attachment everymonring with a table
in it. Every monring I save the attachment over the previous day's file.
If I open the document and then open the VB editor in the project explorer
on the left, there is two projects the first I believe Personal.xls and the
second is the attachment file that I was talking about.
I wanted to create a macro that runs on the open of the file using "Private
Sub Workbook_Open" but the problem is everytime I save the attachment, the
code for that file gets wiped out.
So I was trying to write a "Workbook_Open" under the
"Personal.xls"/"ThisWorbook". But the problem is when I open the file,
"personal.xls" project opens first then my files project opens. Now I think
It is trying to run this code before it open my files workbook, and dosen't
find it. I get an "Error 91" I click cancel, and then my file opens.
The code that I wrote works if I step through it in the VB Editor, but I get
the error on the open of the file.
Any thoughts?
 
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
Runtime error 75 in workbook_open NickHK Excel Programming 0 December 1st 06 10:16 AM
Range.Select error and screen maximizing error in Workbook_Open() Punsterr Excel Programming 3 May 10th 06 10:16 PM
Range.Select error and screen maximizing error in Workbook_Open() Punsterr Excel Programming 0 May 10th 06 07:56 PM
Workbook_Open() Error Minitman[_4_] Excel Programming 5 April 2nd 04 07:59 PM
Workbook_Open() error Ruan[_3_] Excel Programming 2 September 13th 03 09:13 PM


All times are GMT +1. The time now is 04:36 PM.

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"