Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Help Regarding SaveAs option in VB6

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 53
Default Help Regarding SaveAs option in VB6

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dont have secondary axis option listed in Series Option Venus Charts and Charting in Excel 3 February 23rd 10 07:30 PM
Allowing user to choose to accept saveas option Tel Excel Discussion (Misc queries) 4 June 29th 09 12:06 PM
preserve formatting option in pivot table option dialog box Dave F Excel Discussion (Misc queries) 4 May 8th 08 07:25 PM
Option Commands (Option Explicit / Option Base etc) - Scope Alan Excel Programming 8 November 1st 04 02:22 AM
SaveAs works on one PC, not another. "Save" not really an option. What to do? Colleyville Alan Excel Programming 0 July 11th 04 03:43 AM


All times are GMT +1. The time now is 09:25 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"