Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Having trouble getting 'Local' parameter in SaveAs method to work

Hi,

I am having trouble getting the 'Local' parameter in SaveAs to work.
I'm sure I'm missing something really simple. Here is a little VB
program that I wrote:
--------------
Private Sub Command1_Click()
Dim excel As Application
Dim docs As Workbooks
Dim doc As Workbook
Dim wksheets As Sheets
Dim wksheet As Worksheet

Set excel = New Application
Set doc = excel.Workbooks.Open("c:\book1.xls", Local:=True)

Set wksheets = doc.Sheets

Set wksheet = wksheets.Item(1)

wksheet.SaveAs "c:\test3.txt", FileFormat:=xlCSV, Local:=True

End Sub
-----------
I set my regional settings to German/Austrian (currency-€
123.456.789,00). My excel doc is set to use system settings in the
international tab of the tools option dialog. My doc contains five
currency cells which appear as € 123.456.789,00.

Anyway, the above program always generates a .csv in US format. (I have
tried as combinations of specifying Local:=True for Open and SaveAs as
I was not sure if I had to specificy it for both or just one.

I have tried this on two machines. One with excel.10 installed and one
with excel.11. Neither work.

I'm sure it's something simple I'm overlooking.

Any help that you could give me on this matter would be appreciated.

Regards,

Peter Huang

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Having trouble getting 'Local' parameter in SaveAs method to work

Check out Stephen Bullen's chapter on International Issues at his site:

http://www.oaltd.co.uk/ExcelProgRef/ch22/

see if he doesn't cover this issue.

--
Regards,
Tom Ogilvy


wrote in message
oups.com...
Hi,

I am having trouble getting the 'Local' parameter in SaveAs to work.
I'm sure I'm missing something really simple. Here is a little VB
program that I wrote:
--------------
Private Sub Command1_Click()
Dim excel As Application
Dim docs As Workbooks
Dim doc As Workbook
Dim wksheets As Sheets
Dim wksheet As Worksheet

Set excel = New Application
Set doc = excel.Workbooks.Open("c:\book1.xls", Local:=True)

Set wksheets = doc.Sheets

Set wksheet = wksheets.Item(1)

wksheet.SaveAs "c:\test3.txt", FileFormat:=xlCSV, Local:=True

End Sub
-----------
I set my regional settings to German/Austrian (currency-?
123.456.789,00). My excel doc is set to use system settings in the
international tab of the tools option dialog. My doc contains five
currency cells which appear as ? 123.456.789,00.

Anyway, the above program always generates a .csv in US format. (I have
tried as combinations of specifying Local:=True for Open and SaveAs as
I was not sure if I had to specificy it for both or just one.

I have tried this on two machines. One with excel.10 installed and one
with excel.11. Neither work.

I'm sure it's something simple I'm overlooking.

Any help that you could give me on this matter would be appreciated.

Regards,

Peter Huang


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
A little help with SaveAs Method please Stitch45 Excel Programming 1 April 30th 05 01:41 AM
Find method, After parameter melisfreed[_2_] Excel Programming 0 November 7th 04 04:16 AM
Find method, After parameter melisfreed Excel Programming 2 November 5th 04 10:34 PM
More SaveAs trouble Shawn Shuler[_2_] Excel Programming 1 August 9th 04 05:48 AM
SaveAs method L Buchy Excel Programming 1 July 11th 03 11:27 PM


All times are GMT +1. The time now is 11:28 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"