J
Jamie Carper
Due to version differences I need to run some compiler directives that based
on the Office version instantiate the proper objects. (See example below)
Application.Version is useless for this purpose because compiler directives
will only accept a constant. I need a constant that either directly or
indirectly informs me of the Officer version I am currently running in. Is
there such an animal?
e.g.
#IF OfficeVersion > 9 then
Dim MyFilelDialog as FileDialog
Set MyFileDialog = Application.Dialogs(msoFileDialogFolderPicker)
#ELSE
Dim MyFolderDialogas FileDialog2000
Set MyFolderDialog= New FileDialog2000
#END IF
MyFolderDialog.InitialFileName = "C:\TestPage.xls"
MyFolderDialog.Title = "My Personal Folder Browser"
If MyFolderDialog.Show Then
MsgBox "Folder selected: " & MyFolderDialog.InitialFileName
End If
on the Office version instantiate the proper objects. (See example below)
Application.Version is useless for this purpose because compiler directives
will only accept a constant. I need a constant that either directly or
indirectly informs me of the Officer version I am currently running in. Is
there such an animal?
e.g.
#IF OfficeVersion > 9 then
Dim MyFilelDialog as FileDialog
Set MyFileDialog = Application.Dialogs(msoFileDialogFolderPicker)
#ELSE
Dim MyFolderDialogas FileDialog2000
Set MyFolderDialog= New FileDialog2000
#END IF
MyFolderDialog.InitialFileName = "C:\TestPage.xls"
MyFolderDialog.Title = "My Personal Folder Browser"
If MyFolderDialog.Show Then
MsgBox "Folder selected: " & MyFolderDialog.InitialFileName
End If