Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Mayur Patel
 
Posts: n/a
Default GetSaveAsFilename not working in Excel 2003

I am having trouble with a macro that worked in Excel 2000 but will not work
in Excel 2003. In 2000, this macro saves just the data portion but in 2003
it loops endlessly. I also have trouble with a few more macros. Is there a
place where I can go to find variances between Excel 2000 VBA and 2003?

Do
answer = Application.GetSaveAsFilename(InitialFilename:="In itFile",
FileFilter:="Text Files (*.txt), *.txt", Title:="SAP Upload File Name")
Loop Until answer < False
Worksheets("sheet1").SaveAs filename:=answer
  #2   Report Post  
Ron de Bruin
 
Posts: n/a
Default

Hi

Is the complete code ?
Do you want to save the sheet as a txt file ?

Try this

Sub test()
Dim wb As Workbook
Do
answer = Application.GetSaveAsFilename(InitialFileName:="In itFile", _
FileFilter:="Text Files (*.txt), *.txt", Title:="SAP Upload File Name")
Loop Until answer < False
Worksheets("sheet1").Copy
Set wb = ActiveWorkbook
ActiveWorkbook.SaveAs Filename:=answer, FileFormat:=xlText
wb.Close False
End Sub



--
Regards Ron de Bruin
http://www.rondebruin.nl


"Mayur Patel" <Mayur wrote in message ...
I am having trouble with a macro that worked in Excel 2000 but will not work
in Excel 2003. In 2000, this macro saves just the data portion but in 2003
it loops endlessly. I also have trouble with a few more macros. Is there a
place where I can go to find variances between Excel 2000 VBA and 2003?

Do
answer = Application.GetSaveAsFilename(InitialFilename:="In itFile",
FileFilter:="Text Files (*.txt), *.txt", Title:="SAP Upload File Name")
Loop Until answer < False
Worksheets("sheet1").SaveAs filename:=answer



  #3   Report Post  
Mayur Patel
 
Posts: n/a
Default

This is the complete code. My problem isn't with the SaveAs, it is with the
Application.GetSaveAsFilename function.

"Ron de Bruin" wrote:

Hi

Is the complete code ?
Do you want to save the sheet as a txt file ?

Try this

Sub test()
Dim wb As Workbook
Do
answer = Application.GetSaveAsFilename(InitialFileName:="In itFile", _
FileFilter:="Text Files (*.txt), *.txt", Title:="SAP Upload File Name")
Loop Until answer < False
Worksheets("sheet1").Copy
Set wb = ActiveWorkbook
ActiveWorkbook.SaveAs Filename:=answer, FileFormat:=xlText
wb.Close False
End Sub



--
Regards Ron de Bruin
http://www.rondebruin.nl


"Mayur Patel" <Mayur wrote in message ...
I am having trouble with a macro that worked in Excel 2000 but will not work
in Excel 2003. In 2000, this macro saves just the data portion but in 2003
it loops endlessly. I also have trouble with a few more macros. Is there a
place where I can go to find variances between Excel 2000 VBA and 2003?

Do
answer = Application.GetSaveAsFilename(InitialFilename:="In itFile",
FileFilter:="Text Files (*.txt), *.txt", Title:="SAP Upload File Name")
Loop Until answer < False
Worksheets("sheet1").SaveAs filename:=answer




  #4   Report Post  
Ron de Bruin
 
Posts: n/a
Default

I will open a VPC with 2003 to test

--
Regards Ron de Bruin
http://www.rondebruin.nl


"Mayur Patel" wrote in message ...
This is the complete code. My problem isn't with the SaveAs, it is with the
Application.GetSaveAsFilename function.

"Ron de Bruin" wrote:

Hi

Is the complete code ?
Do you want to save the sheet as a txt file ?

Try this

Sub test()
Dim wb As Workbook
Do
answer = Application.GetSaveAsFilename(InitialFileName:="In itFile", _
FileFilter:="Text Files (*.txt), *.txt", Title:="SAP Upload File Name")
Loop Until answer < False
Worksheets("sheet1").Copy
Set wb = ActiveWorkbook
ActiveWorkbook.SaveAs Filename:=answer, FileFormat:=xlText
wb.Close False
End Sub



--
Regards Ron de Bruin
http://www.rondebruin.nl


"Mayur Patel" <Mayur wrote in message ...
I am having trouble with a macro that worked in Excel 2000 but will not work
in Excel 2003. In 2000, this macro saves just the data portion but in 2003
it loops endlessly. I also have trouble with a few more macros. Is there a
place where I can go to find variances between Excel 2000 VBA and 2003?

Do
answer = Application.GetSaveAsFilename(InitialFilename:="In itFile",
FileFilter:="Text Files (*.txt), *.txt", Title:="SAP Upload File Name")
Loop Until answer < False
Worksheets("sheet1").SaveAs filename:=answer






  #5   Report Post  
Ron de Bruin
 
Posts: n/a
Default

First test is OK in 2003

Can you explain this line
Worksheets("sheet1").SaveAs filename:=answer

What do you want to do ?


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Ron de Bruin" wrote in message ...
I will open a VPC with 2003 to test

--
Regards Ron de Bruin
http://www.rondebruin.nl


"Mayur Patel" wrote in message ...
This is the complete code. My problem isn't with the SaveAs, it is with the
Application.GetSaveAsFilename function.

"Ron de Bruin" wrote:

Hi

Is the complete code ?
Do you want to save the sheet as a txt file ?

Try this

Sub test()
Dim wb As Workbook
Do
answer = Application.GetSaveAsFilename(InitialFileName:="In itFile", _
FileFilter:="Text Files (*.txt), *.txt", Title:="SAP Upload File Name")
Loop Until answer < False
Worksheets("sheet1").Copy
Set wb = ActiveWorkbook
ActiveWorkbook.SaveAs Filename:=answer, FileFormat:=xlText
wb.Close False
End Sub



--
Regards Ron de Bruin
http://www.rondebruin.nl


"Mayur Patel" <Mayur wrote in message
...
I am having trouble with a macro that worked in Excel 2000 but will not work
in Excel 2003. In 2000, this macro saves just the data portion but in 2003
it loops endlessly. I also have trouble with a few more macros. Is there a
place where I can go to find variances between Excel 2000 VBA and 2003?

Do
answer = Application.GetSaveAsFilename(InitialFilename:="In itFile",
FileFilter:="Text Files (*.txt), *.txt", Title:="SAP Upload File Name")
Loop Until answer < False
Worksheets("sheet1").SaveAs filename:=answer









  #6   Report Post  
Mayur Patel
 
Posts: n/a
Default

Since it worked for you, I have to assume that the problem is with our
company's installation of Excel 2003. I wasn't even getting to
"Worksheets("sheet1").SaveAs filename:=answer".

By the way, to answer your question, I was trying to save the sheet with the
given name as a text file (tab delimited).

"Ron de Bruin" wrote:

First test is OK in 2003

Can you explain this line
Worksheets("sheet1").SaveAs filename:=answer

What do you want to do ?


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Ron de Bruin" wrote in message ...
I will open a VPC with 2003 to test

--
Regards Ron de Bruin
http://www.rondebruin.nl


"Mayur Patel" wrote in message ...
This is the complete code. My problem isn't with the SaveAs, it is with the
Application.GetSaveAsFilename function.

"Ron de Bruin" wrote:

Hi

Is the complete code ?
Do you want to save the sheet as a txt file ?

Try this

Sub test()
Dim wb As Workbook
Do
answer = Application.GetSaveAsFilename(InitialFileName:="In itFile", _
FileFilter:="Text Files (*.txt), *.txt", Title:="SAP Upload File Name")
Loop Until answer < False
Worksheets("sheet1").Copy
Set wb = ActiveWorkbook
ActiveWorkbook.SaveAs Filename:=answer, FileFormat:=xlText
wb.Close False
End Sub



--
Regards Ron de Bruin
http://www.rondebruin.nl


"Mayur Patel" <Mayur wrote in message
...
I am having trouble with a macro that worked in Excel 2000 but will not work
in Excel 2003. In 2000, this macro saves just the data portion but in 2003
it loops endlessly. I also have trouble with a few more macros. Is there a
place where I can go to find variances between Excel 2000 VBA and 2003?

Do
answer = Application.GetSaveAsFilename(InitialFilename:="In itFile",
FileFilter:="Text Files (*.txt), *.txt", Title:="SAP Upload File Name")
Loop Until answer < False
Worksheets("sheet1").SaveAs filename:=answer








  #7   Report Post  
Ron de Bruin
 
Posts: n/a
Default

By the way, to answer your question, I was trying to save the sheet with the
given name as a text file (tab delimited).


Use my first example then that copy the sheet into a new workbook and save it


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Mayur Patel" wrote in message ...
Since it worked for you, I have to assume that the problem is with our
company's installation of Excel 2003. I wasn't even getting to
"Worksheets("sheet1").SaveAs filename:=answer".

By the way, to answer your question, I was trying to save the sheet with the
given name as a text file (tab delimited).

"Ron de Bruin" wrote:

First test is OK in 2003

Can you explain this line
Worksheets("sheet1").SaveAs filename:=answer

What do you want to do ?


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Ron de Bruin" wrote in message ...
I will open a VPC with 2003 to test

--
Regards Ron de Bruin
http://www.rondebruin.nl


"Mayur Patel" wrote in message
...
This is the complete code. My problem isn't with the SaveAs, it is with the
Application.GetSaveAsFilename function.

"Ron de Bruin" wrote:

Hi

Is the complete code ?
Do you want to save the sheet as a txt file ?

Try this

Sub test()
Dim wb As Workbook
Do
answer = Application.GetSaveAsFilename(InitialFileName:="In itFile", _
FileFilter:="Text Files (*.txt), *.txt", Title:="SAP Upload File Name")
Loop Until answer < False
Worksheets("sheet1").Copy
Set wb = ActiveWorkbook
ActiveWorkbook.SaveAs Filename:=answer, FileFormat:=xlText
wb.Close False
End Sub



--
Regards Ron de Bruin
http://www.rondebruin.nl


"Mayur Patel" <Mayur wrote in message
...
I am having trouble with a macro that worked in Excel 2000 but will not work
in Excel 2003. In 2000, this macro saves just the data portion but in 2003
it loops endlessly. I also have trouble with a few more macros. Is there a
place where I can go to find variances between Excel 2000 VBA and 2003?

Do
answer = Application.GetSaveAsFilename(InitialFilename:="In itFile",
FileFilter:="Text Files (*.txt), *.txt", Title:="SAP Upload File Name")
Loop Until answer < False
Worksheets("sheet1").SaveAs filename:=answer










  #8   Report Post  
Mayur Patel
 
Posts: n/a
Default

Thanks for your help, Ron.

"Ron de Bruin" wrote:

By the way, to answer your question, I was trying to save the sheet with the
given name as a text file (tab delimited).


Use my first example then that copy the sheet into a new workbook and save it


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Mayur Patel" wrote in message ...
Since it worked for you, I have to assume that the problem is with our
company's installation of Excel 2003. I wasn't even getting to
"Worksheets("sheet1").SaveAs filename:=answer".

By the way, to answer your question, I was trying to save the sheet with the
given name as a text file (tab delimited).

"Ron de Bruin" wrote:

First test is OK in 2003

Can you explain this line
Worksheets("sheet1").SaveAs filename:=answer
What do you want to do ?


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Ron de Bruin" wrote in message ...
I will open a VPC with 2003 to test

--
Regards Ron de Bruin
http://www.rondebruin.nl


"Mayur Patel" wrote in message
...
This is the complete code. My problem isn't with the SaveAs, it is with the
Application.GetSaveAsFilename function.

"Ron de Bruin" wrote:

Hi

Is the complete code ?
Do you want to save the sheet as a txt file ?

Try this

Sub test()
Dim wb As Workbook
Do
answer = Application.GetSaveAsFilename(InitialFileName:="In itFile", _
FileFilter:="Text Files (*.txt), *.txt", Title:="SAP Upload File Name")
Loop Until answer < False
Worksheets("sheet1").Copy
Set wb = ActiveWorkbook
ActiveWorkbook.SaveAs Filename:=answer, FileFormat:=xlText
wb.Close False
End Sub



--
Regards Ron de Bruin
http://www.rondebruin.nl


"Mayur Patel" <Mayur wrote in message
...
I am having trouble with a macro that worked in Excel 2000 but will not work
in Excel 2003. In 2000, this macro saves just the data portion but in 2003
it loops endlessly. I also have trouble with a few more macros. Is there a
place where I can go to find variances between Excel 2000 VBA and 2003?

Do
answer = Application.GetSaveAsFilename(InitialFilename:="In itFile",
FileFilter:="Text Files (*.txt), *.txt", Title:="SAP Upload File Name")
Loop Until answer < False
Worksheets("sheet1").SaveAs filename:=answer











  #9   Report Post  
Ron de Bruin
 
Posts: n/a
Default

Change
ActiveWorkbook.SaveAs Filename:=answer, FileFormat:=xlText

to
wb.SaveAs Filename:=answer, FileFormat:=xlText


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Mayur Patel" wrote in message ...
Thanks for your help, Ron.

"Ron de Bruin" wrote:

By the way, to answer your question, I was trying to save the sheet with the
given name as a text file (tab delimited).


Use my first example then that copy the sheet into a new workbook and save it


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Mayur Patel" wrote in message ...
Since it worked for you, I have to assume that the problem is with our
company's installation of Excel 2003. I wasn't even getting to
"Worksheets("sheet1").SaveAs filename:=answer".

By the way, to answer your question, I was trying to save the sheet with the
given name as a text file (tab delimited).

"Ron de Bruin" wrote:

First test is OK in 2003

Can you explain this line
Worksheets("sheet1").SaveAs filename:=answer
What do you want to do ?


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Ron de Bruin" wrote in message ...
I will open a VPC with 2003 to test

--
Regards Ron de Bruin
http://www.rondebruin.nl


"Mayur Patel" wrote in message
...
This is the complete code. My problem isn't with the SaveAs, it is with the
Application.GetSaveAsFilename function.

"Ron de Bruin" wrote:

Hi

Is the complete code ?
Do you want to save the sheet as a txt file ?

Try this

Sub test()
Dim wb As Workbook
Do
answer = Application.GetSaveAsFilename(InitialFileName:="In itFile", _
FileFilter:="Text Files (*.txt), *.txt", Title:="SAP Upload File Name")
Loop Until answer < False
Worksheets("sheet1").Copy
Set wb = ActiveWorkbook
ActiveWorkbook.SaveAs Filename:=answer, FileFormat:=xlText
wb.Close False
End Sub



--
Regards Ron de Bruin
http://www.rondebruin.nl


"Mayur Patel" <Mayur wrote in message
...
I am having trouble with a macro that worked in Excel 2000 but will not work
in Excel 2003. In 2000, this macro saves just the data portion but in 2003
it loops endlessly. I also have trouble with a few more macros. Is there a
place where I can go to find variances between Excel 2000 VBA and 2003?

Do
answer = Application.GetSaveAsFilename(InitialFilename:="In itFile",
FileFilter:="Text Files (*.txt), *.txt", Title:="SAP Upload File Name")
Loop Until answer < False
Worksheets("sheet1").SaveAs filename:=answer













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
External Links on open and Excel 2003 Guardian Excel Discussion (Misc queries) 3 June 16th 05 12:25 AM
"Group" function very slow with Excel 2003 :( ... While very quick with Excel2000 :O) Alain79 Excel Discussion (Misc queries) 4 June 14th 05 07:34 AM
Help in Excel 2003 Charlie Rowe Excel Discussion (Misc queries) 0 June 13th 05 04:31 PM
Excel Range Value issue (Excel 97 Vs Excel 2003) Keeno Excel Discussion (Misc queries) 2 June 13th 05 02:01 PM
sharing/using/saving Excel 2002 files in Excel 2003 maze2009 Excel Discussion (Misc queries) 0 January 20th 05 07:27 PM


All times are GMT +1. The time now is 06:18 PM.

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

About Us

"It's about Microsoft Excel"