Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 43
Default Excel VBA help.

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.

  #2   Report Post  
Posted to microsoft.public.excel.programming
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.



.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Excel VBA help.

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



Windows 95 is a 32Bit application. It requires Windows 95 (32 Bit) or
Windows NT 3.51 (32 Bit) or Later operating system. Not sure how you were
using 16 bit API calls -

Anyway, you can use the Excel VBA code

? application.OperatingSystem
Windows (32-bit) 4.10

I don't believe Excel 95 and earlier understands the Compiler Directive. It
was introduced in VB 4.0, but I am not sure what version of VBA/VB Excel 95
used. VB4 supported both 16 and 32 bit. Your article (first URL below)
talks about the compiler directive approach on Page 9.

I assume the article you spoke of is:

http://support.microsoft.com/default...b;en-us;139372
ACC95: Porting 16-bit Applications Available in Download Center
Porting Your 16-Bit Microsoft Office-Based Solutions to 32-Bit Microsoft
Office

you might want to look at:
http://support.microsoft.com/default...b;en-us;147781
ACC: How to Convert API Calls from 16-bit to 32-bit

http://support.microsoft.com/default...b;en-us;210115
ACC2000: How to Convert API Calls from 16-bit to 32-bit

http://support.microsoft.com/default...b;en-us;224319
ACC2000: Error Message: There Are Calls to 16-Bit Dynamic-Link Libraries

http://support.microsoft.com/default...b;en-us;136064
ACC95: Overview of Conversion Issues

While these are for access, they seem to have the most information. I would
spend more time looking at the Original porting.doc article you spoke of
(first URL)

--
Regards,
Tom Ogilvy



Sheela wrote in message
...
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.



.



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 43
Default Excel VBA help.

Well, this file was created by someone before in a lower
version. When I run this program, it shows some error
messages and some of it says "Can't run 16-bit
program", "Cannot find CTL3D.DLL".

My company has migrated the systems from excel 95 (which
was running in 16-bit environment) to windows 2000 and
2002. So, when I run this program, it shows some errors
while the macros were executing.

Regards,
Sheela

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



Windows 95 is a 32Bit application. It requires Windows

95 (32 Bit) or
Windows NT 3.51 (32 Bit) or Later operating system.

Not sure how you were
using 16 bit API calls -

Anyway, you can use the Excel VBA code

? application.OperatingSystem
Windows (32-bit) 4.10

I don't believe Excel 95 and earlier understands the

Compiler Directive. It
was introduced in VB 4.0, but I am not sure what version

of VBA/VB Excel 95
used. VB4 supported both 16 and 32 bit. Your article

(first URL below)
talks about the compiler directive approach on Page 9.

I assume the article you spoke of is:

http://support.microsoft.com/default.aspx?scid=kb;en-

us;139372
ACC95: Porting 16-bit Applications Available in Download

Center
Porting Your 16-Bit Microsoft Office-Based Solutions to

32-Bit Microsoft
Office

you might want to look at:
http://support.microsoft.com/default.aspx?scid=kb;en-

us;147781
ACC: How to Convert API Calls from 16-bit to 32-bit

http://support.microsoft.com/default.aspx?scid=kb;en-

us;210115
ACC2000: How to Convert API Calls from 16-bit to 32-bit

http://support.microsoft.com/default.aspx?scid=kb;en-

us;224319
ACC2000: Error Message: There Are Calls to 16-Bit

Dynamic-Link Libraries

http://support.microsoft.com/default.aspx?scid=kb;en-

us;136064
ACC95: Overview of Conversion Issues

While these are for access, they seem to have the most

information. I would
spend more time looking at the Original porting.doc

article you spoke of
(first URL)

--
Regards,
Tom Ogilvy



Sheela wrote in message
...
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.



.



.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Excel VBA help.

If it says that, then you need to change to the 32 bit version I would
guess.

Here is an article about using CTL3D.DLL in a 32 bit environment:

http://support.microsoft.com/default...b;en-us;130693
HOWTO: Use CTL3D Under the Windows 95 Operating System

This article talks about the 32bit verion of CTL3D (CTL3D32)

http://support.microsoft.com/default...b;en-us;149860
Older Version of CTL3D.DLL Causes "Not Enough Memory" Message

It may be time to change the code to use newer methods.

--
Regards,
Tom Ogilvy






"Sheela" wrote in message
...
Well, this file was created by someone before in a lower
version. When I run this program, it shows some error
messages and some of it says "Can't run 16-bit
program", "Cannot find CTL3D.DLL".

My company has migrated the systems from excel 95 (which
was running in 16-bit environment) to windows 2000 and
2002. So, when I run this program, it shows some errors
while the macros were executing.

Regards,
Sheela

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



Windows 95 is a 32Bit application. It requires Windows

95 (32 Bit) or
Windows NT 3.51 (32 Bit) or Later operating system.

Not sure how you were
using 16 bit API calls -

Anyway, you can use the Excel VBA code

? application.OperatingSystem
Windows (32-bit) 4.10

I don't believe Excel 95 and earlier understands the

Compiler Directive. It
was introduced in VB 4.0, but I am not sure what version

of VBA/VB Excel 95
used. VB4 supported both 16 and 32 bit. Your article

(first URL below)
talks about the compiler directive approach on Page 9.

I assume the article you spoke of is:

http://support.microsoft.com/default.aspx?scid=kb;en-

us;139372
ACC95: Porting 16-bit Applications Available in Download

Center
Porting Your 16-Bit Microsoft Office-Based Solutions to

32-Bit Microsoft
Office

you might want to look at:
http://support.microsoft.com/default.aspx?scid=kb;en-

us;147781
ACC: How to Convert API Calls from 16-bit to 32-bit

http://support.microsoft.com/default.aspx?scid=kb;en-

us;210115
ACC2000: How to Convert API Calls from 16-bit to 32-bit

http://support.microsoft.com/default.aspx?scid=kb;en-

us;224319
ACC2000: Error Message: There Are Calls to 16-Bit

Dynamic-Link Libraries

http://support.microsoft.com/default.aspx?scid=kb;en-

us;136064
ACC95: Overview of Conversion Issues

While these are for access, they seem to have the most

information. I would
spend more time looking at the Original porting.doc

article you spoke of
(first URL)

--
Regards,
Tom Ogilvy



Sheela wrote in message
...
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.



.



.



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



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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"