Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Translation of VBA from PC to MAC

Hello,

I have the following code in my PC version that works without error,
could someone tell me how to modify it so that I can have it open in a
MAC version?

pathname = ActiveWorkbook.Path
Databasaefile = pathname & "\Database.XLS"
Workbooks.Open Filename:=Databasefile

Basically, for the third line it gives me a Run-time error. I believe
it doesn't recognize the pathname.

Thanks,
alina b.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 762
Default Translation of VBA from PC to MAC

alina b. -

If you don't get any assistance here, I suggest you post in the following
newsgroup:

microsoft.public.mac.office.excel

And, you could use the advanced search feature of Google Groups to see if
there are past newsgroup messages on this topic.

- Mike
www.mikemiddleton.com

"alina b." wrote in message
ups.com...
Hello,

I have the following code in my PC version that works without error,
could someone tell me how to modify it so that I can have it open in a
MAC version?

pathname = ActiveWorkbook.Path
Databasaefile = pathname & "\Database.XLS"
Workbooks.Open Filename:=Databasefile

Basically, for the third line it gives me a Run-time error. I believe
it doesn't recognize the pathname.

Thanks,
alina b.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Translation of VBA from PC to MAC

Thank you Mike

Mike Middleton wrote:
alina b. -

If you don't get any assistance here, I suggest you post in the following
newsgroup:

microsoft.public.mac.office.excel

And, you could use the advanced search feature of Google Groups to see if
there are past newsgroup messages on this topic.

- Mike
www.mikemiddleton.com

"alina b." wrote in message
ups.com...
Hello,

I have the following code in my PC version that works without error,
could someone tell me how to modify it so that I can have it open in a
MAC version?

pathname = ActiveWorkbook.Path
Databasaefile = pathname & "\Database.XLS"
Workbooks.Open Filename:=Databasefile

Basically, for the third line it gives me a Run-time error. I believe
it doesn't recognize the pathname.

Thanks,
alina b.


  #4   Report Post  
Posted to microsoft.public.excel.programming
KR KR is offline
external usenet poster
 
Posts: 121
Default Translation of VBA from PC to MAC

It seems to me that there is something related to the path seperator - I
believe Mac handles it differently, e.g. I think you can't use "\" in your
path, but I don't have a Mac so I can't be positive. There should be some
variable (which I thought was pathSeparator, but I can't find that in the
Excel help file) that you can use so it will select the correct path
seperator regardless of platform.

"alina b." wrote in message
ups.com...
Hello,

I have the following code in my PC version that works without error,
could someone tell me how to modify it so that I can have it open in a
MAC version?

pathname = ActiveWorkbook.Path
Databasaefile = pathname & "\Database.XLS"
Workbooks.Open Filename:=Databasefile

Basically, for the third line it gives me a Run-time error. I believe
it doesn't recognize the pathname.

Thanks,
alina b.



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 860
Default Translation of VBA from PC to MAC

Hi KR,

KR wrote:
It seems to me that there is something related to the path seperator
- I believe Mac handles it differently, e.g. I think you can't use
"\" in your path, but I don't have a Mac so I can't be positive.
There should be some variable (which I thought was pathSeparator, but
I can't find that in the Excel help file) that you can use so it will
select the correct path seperator regardless of platform.


You're correct - Application.PathSeparator should be used instead of
hardcoding the "\" character. I'm not sure if that's the only problem with
the OP's code running on a Mac, but it should help.

--
Regards,

Jake Marx
www.longhead.com


[please keep replies in the newsgroup - email address unmonitored]

"alina b." wrote in message
ups.com...
Hello,

I have the following code in my PC version that works without error,
could someone tell me how to modify it so that I can have it open in
a MAC version?

pathname = ActiveWorkbook.Path
Databasaefile = pathname & "\Database.XLS"
Workbooks.Open Filename:=Databasefile

Basically, for the third line it gives me a Run-time error. I
believe it doesn't recognize the pathname.

Thanks,
alina b.





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
Code translation please N.F[_2_] Excel Discussion (Misc queries) 0 July 6th 07 12:42 AM
Multilanguage translation Simon[_16_] Excel Programming 9 July 13th 05 12:12 PM
Value translation Sheldon Excel Programming 1 September 28th 04 09:16 PM
RNG translation DiZzY Excel Programming 2 May 19th 04 08:08 PM
Need Translation Phil Hageman Excel Programming 1 July 25th 03 03:19 PM


All times are GMT +1. The time now is 09:40 AM.

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"