Thread: Excel VBA help.
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
sheela sheela is offline
external usenet poster
 
Posts: 43
Default Excel VBA help.

Will this be good enough to run in a 16-bit environment
and 32-bit environment? Is there anywhere else where I
have to make this sort of changes? I'm new to this. While
I was surfing the net, I came across on "Porting Your 16*
bit Office*Based Solutions to 32*bit Office". It shows the
declaration which I have to addin for 16-bit and 32-bit
but I really don't know where to insert this code.

Thanks,

Sheela


-----Original Message-----
Use compiler directives:

#If Win32 Then
'. Place exclusively 32-bit Windows statements here.
Declare Function GetVersionEx Lib "kernel32" _
Alias "GetVersionExA" (lpVersionInformation As _
OSVERSIONINFO) As Long
#Elseif Win16
Declare Function GetVersionEx Lib "KERNEL" _
Alias "GetVersionExA" (lpVersionInformation As _
OSVERSIONINFO) As Long
#End If

The Win32 and Win16 constants are defined by VBA.

--
Regards,
Tom Ogilvy

Sheela wrote in message
...
Hello Sir,

Can I insert two declaration statement as below for 16-
bit and 32-bit in Excel together. I'm actually trying

to
convert excel programs created in excel 95 (16-bit
version) to excel 2000 (32-bit version).

__________________________________________________ ____
Declare Function GetVersionEx Lib "kernel32"
Alias "GetVersionExA" (lpVersionInformation As
OSVERSIONINFO) As Long

Declare Function GetVersionEx Lib "KERNEL"
Alias "GetVersionExA" (lpVersionInformation As
OSVERSIONINFO) As Long
__________________________________________________ _____

Will it affect the operating system? Please advise.

Thanks.



.