Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I am writing the following code to open an excel file if present in that path and want to save it with a different name using the Save As option in vb6, the code is as below sOutFol = App.Path Set moApp = New excel.Application On Error GoTo solution moApp.Workbooks.Open (sOutFol & "\" & "output.xls") moApp.Visible = True Set mywb = moApp.Workbooks(1) If (moApp.Visible = True) Then mywb.Close MsgBox " Save the Output.xls with other name and then click OK " y = outputold.xls FileName = mywb.SaveAs(y, ForReading) Form2.Show Any one who know what values to pass to the SaveAs function or please give a piece of code which works for SaveAs function.. Thanks in Advance Swamy |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi, try this:
Application.Dialogs(xlDialogSaveAs).Show Henrich €žSpiderSwamy" napĂ*sal (napĂ*sala): Hi, I am writing the following code to open an excel file if present in that path and want to save it with a different name using the Save As option in vb6, the code is as below sOutFol = App.Path Set moApp = New excel.Application On Error GoTo solution moApp.Workbooks.Open (sOutFol & "\" & "output.xls") moApp.Visible = True Set mywb = moApp.Workbooks(1) If (moApp.Visible = True) Then mywb.Close MsgBox " Save the Output.xls with other name and then click OK " y = outputold.xls FileName = mywb.SaveAs(y, ForReading) Form2.Show Any one who know what values to pass to the SaveAs function or please give a piece of code which works for SaveAs function.. Thanks in Advance Swamy |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Dont have secondary axis option listed in Series Option | Charts and Charting in Excel | |||
Allowing user to choose to accept saveas option | Excel Discussion (Misc queries) | |||
preserve formatting option in pivot table option dialog box | Excel Discussion (Misc queries) | |||
Option Commands (Option Explicit / Option Base etc) - Scope | Excel Programming | |||
SaveAs works on one PC, not another. "Save" not really an option. What to do? | Excel Programming |