Anthony's VBA Forum Index Anthony's VBA Forum
Where the knowledge is shared
Menu
 Anthony's VBA Forum IndexHome Page
 Anthony's VBA Forum IndexForum Index
FAQFAQ
MemberlistMemberlist
UsergroupsUsergroups
RegisterRegister
ProfileProfile
Log in to check your private messagesMessages
Log inLogin/Out

Quick Search

Advanced Search

Links
Consulting
Products

Who's Online
[ Administrator ]
[ Moderator ]


Workbook_Open

 
Post new topic   Reply to topic     Anthony's VBA Forum Index -> General Excel VBA
View previous topic :: View next topic  
Author Message
totr1



Joined: 20 Aug 2008
Posts: 4

PostPosted: Wed Aug 20, 2008 5:52 am    Post subject: Workbook_Open Reply with quote

Hi
In the add_in (*.xla) this code is in "ThisWorkbook":
Private Sub Workbook_Open()
UserForm1.Show 'Welcome
End Sub

And the UserForm1-code is:
Private Sub UserForm_Click()
Unload Me
End Sub

Works fine as an *.xls-file. But as an Add_in (*.xla), my file (ie. MyFile.xls) won't open (must opened MyFile.xls with a second try).

What am I doing wrong?
Kind regards
Back to top
View user's profile Send private message
totr1



Joined: 20 Aug 2008
Posts: 4

PostPosted: Wed Aug 20, 2008 6:20 am    Post subject: Workbook_Open Reply with quote

Appendix: Works fine opening excelfiles downloaded and opened from the web. But not opening the files from my directory.
t
Back to top
View user's profile Send private message
mohan.ankur
Moderator
Moderator


Joined: 02 Aug 2006
Posts: 52

PostPosted: Wed Aug 20, 2008 11:40 am    Post subject: Hi Reply with quote

So, U mean the Workbook open code you put in the does not work when it is saved as .xla file?

Can you please clarify this more with an example?

Ankur
_________________
http://www.exceldepot.com
http://www.xlmacros.com
http://www.learnexcel.org
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
totr1



Joined: 20 Aug 2008
Posts: 4

PostPosted: Wed Aug 20, 2008 11:55 am    Post subject: Reply with quote

The Workbook_Open/Add_In works allright. However, I start Excel why I would like to open/click on "MyFile.xls". Excel starts, Add_In opens as expected, but "MyFile.xls" is does not open. The Excel is started without any sheets visible.

Or put it in an other way, when the Add_In starts with a UserBox1 "Welcome", the file (ie. MyFile.xls) does not open. Only Excel and the Add_In start.

In advance, thank You.

t
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Anthony's VBA Forum Index -> General Excel VBA All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group