ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   XL2003 to XL2000 code converson (https://www.excelbanter.com/excel-programming/442357-xl2003-xl2000-code-converson.html)

CLR

XL2003 to XL2000 code converson
 
Hi All.....

This code works fine in XL2003, but I need the result to work in
XL2000.....possible?

Dim strFile As Variant
With Application.FileDialog(msoFileDialogOpen)
.AllowMultiSelect = False
.Filters.Add "Excel Files", "*.xls"
.InitialFileName = ThisWorkbook.Path & "\"
.Show
strFile = .SelectedItems(1)
End With
Workbooks.Open Filename:=strFile

TIA
Vaya con Dios,
Chuck, CABGx3



Homey

XL2003 to XL2000 code converson
 
Application.FileDialog not in 2000. so just use this

Dim File As Variant
ChDrive ThisWorkbook.Path
ChDir ThisWorkbook.Path
File = Application.GetOpenFilename("Excel files(*.xls),*.xls")
If File < False Then Workbooks.Open File

"CLR" wrote in message
...
| Hi All.....
|
| This code works fine in XL2003, but I need the result to work in
| XL2000.....possible?
|
| Dim strFile As Variant
| With Application.FileDialog(msoFileDialogOpen)
| .AllowMultiSelect = False
| .Filters.Add "Excel Files", "*.xls"
| .InitialFileName = ThisWorkbook.Path & "\"
| .Show
| strFile = .SelectedItems(1)
| End With
| Workbooks.Open Filename:=strFile
|
| TIA
| Vaya con Dios,
| Chuck, CABGx3
|
|


CLR

XL2003 to XL2000 code converson
 
Many thanks Homey.......
I appreciate your help very much

Vaya con Dios,
Chuck, CABGx3



"Homey" wrote:

Application.FileDialog not in 2000. so just use this

Dim File As Variant
ChDrive ThisWorkbook.Path
ChDir ThisWorkbook.Path
File = Application.GetOpenFilename("Excel files(*.xls),*.xls")
If File < False Then Workbooks.Open File

"CLR" wrote in message
...
| Hi All.....
|
| This code works fine in XL2003, but I need the result to work in
| XL2000.....possible?
|
| Dim strFile As Variant
| With Application.FileDialog(msoFileDialogOpen)
| .AllowMultiSelect = False
| .Filters.Add "Excel Files", "*.xls"
| .InitialFileName = ThisWorkbook.Path & "\"
| .Show
| strFile = .SelectedItems(1)
| End With
| Workbooks.Open Filename:=strFile
|
| TIA
| Vaya con Dios,
| Chuck, CABGx3
|
|

.



All times are GMT +1. The time now is 07:34 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com