Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form to Launch Before Spreadsheet

Status
Not open for further replies.

Fallenwing

Programmer
Aug 8, 2003
13
CA
Hey, I want to make a form using VBA that pops up immediately when you open a spreadsheet(in fact I want the spreadsheet itself to be hidden, I just need it for the data that will be displayed on the forms.) In essence this would work fine with just Visual Basic, but I know VBA much better and i don't think data referencing to Excel works with VB like it does with VBA. Is this possible or am I just dreaming?
 
Hi
I'm not sure this is exactly the sort of thing you're looking for but it may be a good starting point. However the workbook is visible for a short while before it disappears.

Code:
Private Sub Workbook_Open()
ActiveWindow.Visible = False
UserForm1.Show
End Sub

;-)

If a man says something and there are no women there to hear him, is he still wrong? [ponder]
The faqs ma'am, just the faqs. Get the best from these forums : faq222-2244
 
Thanks Loomah. Does anybody else out there know of a way to activate a form without any trace of the workbook popping up? I'd love to know. This could also be a powerful tool in making a free VB alternative built into every computer with Office.
 
I believe you can just go to window/hide then save the workbook. Then modify Loomah's code like this:
Private Sub Workbook_Open()
UserForm1.Show
End Sub

HTH,
Eric
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top