If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Excel > Name the Excel WokBook at the time of creation

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-03-04, 10:28
prajeesh prajeesh is offline
Registered User
 
Join Date: Mar 2004
Location: India
Posts: 2
Name the Excel WokBook at the time of creation

Hi,
I would like to Name the Excel WorkBook that i create so that by the time i say "Save File"..the file name appears in the File Name Text Box.

Dim ExObj As Excel.Application
Dim WbObj As Excel.Workbook
Dim WsObj As Excel.Worksheet

Private Sub Command1_Click()
Set ExObj = CreateObject("Excel.Application")
Set WbObj = ExObj.Workbooks.Add
Set WsObj = WbObj.Worksheets.Add
....
Reply With Quote
  #2 (permalink)  
Old 03-26-04, 15:35
kck kck is offline
Registered User
 
Join Date: Feb 2004
Posts: 13
Little Late But....

If you haven't already worked this out, try using the following as the next line in your code -

ExObj.ActiveWorkbook.SaveAs Filename:="myFile.xls"
Reply With Quote
  #3 (permalink)  
Old 03-29-04, 02:47
prajeesh prajeesh is offline
Registered User
 
Join Date: Mar 2004
Location: India
Posts: 2
Re: Little Late But....

Thanks for the reply. I have used the following statement based on the return code i get from a confirmation box.

xlApp.Dialogs(xlDialogSaveAs).Show("MyFile.xls")
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On