View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Asha Asha is offline
external usenet poster
 
Posts: 12
Default specific name for saving.

greetings, i'm using active x to create an excel object and it works fine. sweet. the next portion is to specify name for it. i would like to have a default name in the save dialog box when the user click on the save button. besides having is like "book1.xls" i would like it to call "myspecific name.xls". can someone show me the codes? attach below are my codes for it.

*** begin ***
<SCRIPT language="vbscript"

Sub btnClientExport_onclick

Dim sHTML

sHTML = document.all.item("dgDS2Excel").outerhtml

Dim oXL, oBook

Set oXL = CreateObject("Excel.Application")

Set oBook = oXL.Workbooks.Add

oBook.HTMLProject.HTMLProjectItems("Sheet1").Text = sHTML

'oXL.SaveAs "C:\something"

oBook.HTMLProject.RefreshDocument

oXL.Visible = true

oXL.UserControl = true


End Sub

</SCRIPT

*** end ***


thanks in advance for the reply.


asha...