ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   File Handling in Excel for Mac (https://www.excelbanter.com/excel-programming/378626-file-handling-excel-mac.html)

JLatham

File Handling in Excel for Mac
 
I need help helping someone. They are using Excel on a Mac and apparently I
know even less than I thought I did about programming in VBA on that platform.

Can anyone point me to some code snippets or help regarding these areas:

#1: Using Application.GetOpenFilename() on that platform? User gets Error
1004 when trying it the Windows way.

#2: Once I've got a file path/name, how to open it for read? The file is
actually a text file, one field of a record per row, with several rows making
up one record. To be specific, trying to read a QIF file - Intuit Quickbooks
format.

#3: proper code to do the equivalent of
Do While Not EOF(#filebuffer)
Line Input #filebuffer, OneLineFromFile
.....process that text data
Loop

and of course, How to properly close the text file.

This whole exercise is making me feel quite inadequate!

Tom Ogilvy

File Handling in Excel for Mac
 
Microsoft.public.mac.office.excel

might be a better location for this.

--
Regards,
Tom Ogilvy

"JLatham" <HelpFrom @ Jlathamsite.com.(removethis) wrote in message
...
I need help helping someone. They are using Excel on a Mac and apparently
I
know even less than I thought I did about programming in VBA on that
platform.

Can anyone point me to some code snippets or help regarding these areas:

#1: Using Application.GetOpenFilename() on that platform? User gets Error
1004 when trying it the Windows way.

#2: Once I've got a file path/name, how to open it for read? The file is
actually a text file, one field of a record per row, with several rows
making
up one record. To be specific, trying to read a QIF file - Intuit
Quickbooks
format.

#3: proper code to do the equivalent of
Do While Not EOF(#filebuffer)
Line Input #filebuffer, OneLineFromFile
....process that text data
Loop

and of course, How to properly close the text file.

This whole exercise is making me feel quite inadequate!




JLatham

File Handling in Excel for Mac
 
Thanks, Tom, I'll repost over there, and shut it down here.

Many thanks for that info.

"Tom Ogilvy" wrote:

Microsoft.public.mac.office.excel

might be a better location for this.

--
Regards,
Tom Ogilvy

"JLatham" <HelpFrom @ Jlathamsite.com.(removethis) wrote in message
...
I need help helping someone. They are using Excel on a Mac and apparently
I
know even less than I thought I did about programming in VBA on that
platform.

Can anyone point me to some code snippets or help regarding these areas:

#1: Using Application.GetOpenFilename() on that platform? User gets Error
1004 when trying it the Windows way.

#2: Once I've got a file path/name, how to open it for read? The file is
actually a text file, one field of a record per row, with several rows
making
up one record. To be specific, trying to read a QIF file - Intuit
Quickbooks
format.

#3: proper code to do the equivalent of
Do While Not EOF(#filebuffer)
Line Input #filebuffer, OneLineFromFile
....process that text data
Loop

and of course, How to properly close the text file.

This whole exercise is making me feel quite inadequate!





NickHK

File Handling in Excel for Mac
 
#1:
You have to change the file filter string, as "*" is an MS-DOS wild card
character.
MS code :
http://support.microsoft.com/kb/190032
although others mention this does not work
http://macosx.com/forums/software-pr...esnt-work.html

Also, from a previous thread here, I remember that Multiselect does not work
on the Mac. So maybe you have to sue the simple :
filePath = Application.GetOpenFilename(, , , "Select",False)

As As for #2 & #3, see the MS link above.

NickHK

"JLatham" <HelpFrom @ Jlathamsite.com.(removethis) wrote in message
...
I need help helping someone. They are using Excel on a Mac and apparently

I
know even less than I thought I did about programming in VBA on that

platform.

Can anyone point me to some code snippets or help regarding these areas:

#1: Using Application.GetOpenFilename() on that platform? User gets Error
1004 when trying it the Windows way.

#2: Once I've got a file path/name, how to open it for read? The file is
actually a text file, one field of a record per row, with several rows

making
up one record. To be specific, trying to read a QIF file - Intuit

Quickbooks
format.

#3: proper code to do the equivalent of
Do While Not EOF(#filebuffer)
Line Input #filebuffer, OneLineFromFile
....process that text data
Loop

and of course, How to properly close the text file.

This whole exercise is making me feel quite inadequate!





All times are GMT +1. The time now is 12:22 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com