VB Macro to Tell If You Are Running 16-bit or 32-bit MS Excel
Article ID: 136147
Article Last Modified on 9/13/2006
APPLIES TO
- Microsoft Excel 95 Standard Edition
- Microsoft Excel 5.0 Standard Edition
- Microsoft Excel 5.0c
- Microsoft Excel 5.0 Standard Edition
This article was previously published under Q136147
SUMMARY
This article includes a sample Visual Basic, Applications Edition,
procedure that can be used to determine whether the version of Microsoft
Excel that is running is the 16-bit or the 32-bit version.
Sample Visual Basic, Applications Edition, Procedure
Microsoft provides examples of Visual Basic procedures for illustration
only, without warranty either expressed or implied, including but not
limited to the implied warranties of merchantability and/or fitness for a
particular purpose. This Visual Basic procedure is provided 'as is' and
Microsoft does not guarantee that it can be used in all situations.
Microsoft does not support modifications of this procedure to suit customer
requirements for a particular purpose.
Sub Excel_16or32bit()
Dim opsys32bit As Boolean
'set opsys32bit true if "32-bit" found in operating system string
'False otherwise
opsys32bit = Application.OperatingSystem Like "*32-bit*"
'If true
If opsys32bit Then
'Call the 32-bit function here
MsgBox "You are running 32-bit Microsoft Excel."
Else
'otherwise call the 16-bit function here
MsgBox "You are running 16-bit Microsoft Excel."
End If
End Sub
Additional query words: 32bit 16bit howto
Keywords: kbprogramming KB136147