Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old July 12th, 2003, 05:28 AM
Bawbag Bawbag is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: Bristol UK
Posts: 1 Bawbag User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question Loading a Form At startup

Hi,

Can anyone help ????????

I want a form to load in excel when the file opens and deactivate all other options until the user has made an input into the form and clicked a button.

The form is a user form created in VBA


Thanks

Reply With Quote
  #2  
Old July 14th, 2003, 02:32 PM
gguoming gguoming is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 5 gguoming User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Hi,
Here is some some code i used before. Hope it helps.

'Excel Template Variables
Dim xlRptAp As New Excel.Application
Dim xlRptWb As New Excel.Workbook
Dim xlRptDst As String
Dim xlRptSrcPath As String

'Connect to Excel
Set xlRptAp = CreateObject("Excel.Application")
'Make Excel Visible
xlRptAp.Visible = True
'define the Excel File directory
xlRptSrcPath = "d:\Reports\templates\MyReports.xls"


'Connect to Excel Report Workbook
Set xlRptWb = xlRptAp.Workbooks.Open(xlRptSrcPath )

'Connect to Excel Report Workbook
xlRptAp.Workbooks(1).Activate

' call Excel Auto_Open macro to generate the Reports
' call your macro or function to process the Excel file
xlRptAp.ActiveWorkbook.RunAutoMacros xlAutoOpen
xlRptAp.ActiveWorkbook.Save

xlRptAp.Application.ActiveWorkbook.Close
xlRptAp.Application.Quit

Jim Guo

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming > Loading a Form At startup


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway