Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I have some code that runs fine on a PC but trips up a mac. I have found a workaround for the mac, but I need to find a way to shield the code in eaqch case, along the lines of: If [I'm running on a Mac] then mac code Else PC code End if Anyone know how to do this? Thanks in advance. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
MsgBox Environ("OS")
Returns 'Windows_NT' on my XP machine, never tried it on a Mac. Thanks! Cliff Edwards |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
MsgBox Environ("OS")
Returns 'Windows_NT' on my XP machine, never tried it on a Mac. That would be a problem on a Mac using Excel 2008... there is no VBA in that version. This worksheet function can be used to determine the operating system... =INFO("system") It will return either "mac" or "pcdos" as appropriate. Rick Rothstein (MVP - Excel) |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Feb 7, 6:09*pm, "Rick Rothstein"
wrote: MsgBox Environ("OS") Returns 'Windows_NT' on my XP machine, never tried it on a Mac. That would be a problem on a Mac using Excel 2008... there is no VBA in that version. This worksheet function can be used to determine the operating system... =INFO("system") It will return either "mac" or "pcdos" as appropriate. Rick Rothstein (MVP - Excel) Thank you! |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Yes, Environ("OS") would be useless if VBA weren't available, but the
OP stated that he had working code for Mac, just needed a way to determine what environment the code was running in to see whether to run pc code or Mac code. Just sayin'. ;) Respectfully, Cliff Edwards |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Tue, 8 Feb 2011 16:24:02 -0800 (PST), ward376
wrote: Yes, Environ("OS") would be useless if VBA weren't available, but the OP stated that he had working code for Mac, just needed a way to determine what environment the code was running in to see whether to run pc code or Mac code. Just sayin'. ;) Respectfully, Cliff Edwards The fact that there is a requisite of a differential is a problem and breaks programming rules from decades ago. You guys could not make a MAC port that was fully compliant? No, not merely opening of files, but FULLY compliant. No re-do required. Pretty sad the CRAP that Apple has put the world through. Thir crap artificially inflated prices throughout the industry. Jobs is an idiot. His money grubbing will be/IS part of what harms this nation's economy. None of you phone wielding twits will ever see it though, since you are all hard wired with horse blinders on. |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Mon, 7 Feb 2011 17:09:01 -0800 (PST), ward376
wrote: MsgBox Environ("OS") Returns 'Windows_NT' on my XP machine, never tried it on a Mac. Thanks! Cliff Edwards What would return in a remote session? The OS of the client or the OS of the host? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel Run-time Environment | Excel Programming | |||
Running an excel sheet which uses RTD calls as a service? | Excel Programming | |||
running macros/vba code in a shared environment | Excel Programming | |||
Copy Excel sheet into IE environment | Excel Programming | |||
Running Code on Each Sheet in an Excel Workbook | Excel Programming |