Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Mac > Excel for Mac > Re: ERROR when ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 2 Topic 251 of 349
Post > Topic >>

Re: ERROR when using GetOpenFilename

by tar@[EMAIL PROTECTED] (Thomas A. Russ) Nov 29, 2005 at 12:15 PM

darin.kelberlau@[EMAIL PROTECTED]
 writes:

> 
> When I run the following code I get an error:
> 
> 
> CODE:
> fname=Application.GetOpenFilename(filefilter:="TEXT FILES(*.TXT),
> *.TXT")
> 
> 
> ERROR:
> Run-time error '1004'
> Method 'GetOpenFilename' of object '_Application' failed
> 
> 
> This works on a PC but not on a Mac!! 

That is because the format of the file filter string differs between
Macs and PCs.  On the Macintosh, the string is a list of comma-separated
file type codes.  You will want to use "TEXT" as the rough equivalent of
the above file filter item.

Of course, with OS X, the file types are not always present, so that
could pose some problems.  However, you could probably use the "TEXT"
filter type.

> 
> 
> PLEASE HELP!!!!

A good resource is the VBA help for Excel in the VBA Editor.

-- 
Thomas A. Russ,  USC/Information Sciences Institute
 




 2 Posts in Topic:
ERROR when using GetOpenFilename
darin.kelberlau@[EMAIL PR  2005-11-23 09:36:55 
Re: ERROR when using GetOpenFilename
tar@[EMAIL PROTECTED] (T  2005-11-29 12:15:29 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Dec 5 5:25:20 CST 2008.