Home > Archive > Programming with dBASE > March 2006 > excel.saveas()









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author excel.saveas()
mark

2006-03-19, 11:07 am

I am trying to use Excel's "saveas" method from dbase: oExcel.ActiveWorkbook.SaveAs("C:\test.dbf", formattype)

I couldn't find any info to help me setup the formatType to dbf.

Any idea would be most appreciated.

TIA

Mark


mark

2006-03-19, 11:07 am

Funny how you search for something for hours on end just to find it lurking close by.


Soon after posting my message I found the answer: oExcel.ActiveWorkbook.SaveAs("C:\test.dbf", 11)

"11" for dbf 4 format.

Thanks all the same.

Mark

"mark" <hicom05@btinternet.com> wrote in message news:UkClPp0SGHA.1488@news-server...
>I am trying to use Excel's "saveas" method from dbase: oExcel.ActiveWorkbook.SaveAs("C:\test.dbf", formattype)
>
> I couldn't find any info to help me setup the formatType to dbf.
>
> Any idea would be most appreciated.
>
> TIA
>
> Mark
>
>



Bruce Beacham

2006-03-19, 11:07 am

mark wrote:

> Soon after posting my message I found the answer: oExcel.ActiveWorkbook.SaveAs("C:\test.dbf", 11)
>
> "11" for dbf 4 format.


Where did you find that 11 is the xldbf4 constant?


Bruce Beacham
mark

2006-03-21, 3:25 am


"Bruce Beacham" <bbeacham@beacham.no-spam.co.uk> wrote in message news:GJL2q$2SGHA.560@news-server...
> mark wrote:
>
>
> Where did you find that 11 is the xldbf4 constant?
>
>
> Bruce Beacham


Found it somewhere on the net, unfortunately I mislead the address. However, here are the constant:

FileFormat Property (Read-Only Long)
This property returns the file format or type of the workbook. It can be one of the
following XlFileFormat constants:
Enum XlFileFormat
xlAddIn = 18
xlCSV = 6
xlCSVMac = 22
xlCSVMSDOS = 24
xlCSVWindows = 23
xlCurrentPlatformTex
t = -4158
xlDBF2 = 7
xlDBF3 = 8
xlDBF4 = 11
xlDIF = 9
xlExcel2 = 16
xlExcel2FarEast = 27
xlExcel3 = 29
xlExcel4 = 33
xlExcel4Workbook = 35
xlExcel5 = 39
xlExcel7 = 39
xlExcel9795 = 43
xlHtml = 44
xlIntlAddIn = 26
xlIntlMacro = 25
xlSYLK = 2
xlTemplate = 17
xlTextMac = 19
xlTextMSDOS = 21
xlTextPrinter = 36
xlTextWindows = 20
xlUnicodeText = 42
xlWebArchive = 45
xlWJ2WD1 = 14

I can email you the PDF file I downloaded containing a tutorial cum user-guide for writing macros using VBA.


Mark


Bruce Beacham

2006-03-21, 3:25 am

mark wrote:
[color=darkred]
> Found it somewhere on the net, unfortunately I mislead the address. However, here are the constant:


Thanks.

> I can email you the PDF file I downloaded containing a tutorial cum user-guide for writing macros using VBA.


Yes please: always useful, although I've been doing some stuff in VB
in Excel for a while now.


Bruce
Rick Gearardo

2006-03-21, 3:25 am

If you are using macros to find the Excel commands for dBase you can hold
your mouse over the constant in the macro editor and it will tell you the
numeric value in a popup.

Rick

"Bruce Beacham" <bbeacham@beacham.no-spam.co.uk> wrote in message
news:GJL2q$2SGHA.560@news-server...
> mark wrote:
>
>
> Where did you find that 11 is the xldbf4 constant?
>
>
> Bruce Beacham



Bruce Beacham

2006-03-21, 3:25 am

Rick Gearardo wrote:
> If you are using macros to find the Excel commands for dBase you can hold
> your mouse over the constant in the macro editor and it will tell you the
> numeric value in a popup.


Aha! Thanks for that.


Bruce
Sébastien de Breuck

2006-03-23, 7:30 am

Bruce Beacham Wrote:


> Where did you find that 11 is the xldbf4 constant?
>
>
> Bruce Beacham


Another way to find the constants is to use the method posted by Gary White on 18 Jul 2001 in the previous newsgroup :

Easiest way to find the value for VB constants: in Excel, press
Alt+F11 to open the VB Editor. In the VB Editor, press F2 to open the
Object Browser. Type in the constant you're searching for and click
the Find button.

mark

2006-03-27, 3:23 am

Bruce,

I tried to email you, but my message and attachment were rejected because of your address.

Let me know if you still want me to send the attachment.

Mark



"Bruce Beacham" <bbeacham@beacham.no-spam.co.uk> wrote in message news:m9aJgRGTGHA.1488@news-server...
> Rick Gearardo wrote:
>
> Aha! Thanks for that.
>
>
> Bruce



Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com