C
Christy
I am using code provided at Ron's web site and with his help (Thanks Ron!)
and help form this forum I got the code to work except I am not getting the
data I expect.
On the Saturday sheet, cell b2 contains a date and cell b3 has city/state/zip
Sub GetData_Example2()
Dim SaveDriveDir As String, MyPath As String
Dim FName As Variant
SaveDriveDir = CurDir
MyPath = Application.DefaultFilePath 'or use "C:\Data"
ChDrive MyPath
ChDir MyPath
FName = Application.GetOpenFilename(filefilter:="Excel Files, *.xls")
If FName = False Then
'do nothing
Else
****When I run either****
GetData FName, "Saturday", "b2:b3", Sheets("Source").Range("b2"), False
Or
GetData FName, "Saturday", "b2:b3", Sheets("Source").Range("b2:b3"), False
I get the city/state/zip in b2 (no date)
When I run
GetData FName, "Saturday", "b1:b3", Sheets("Source").Range("b2:b3"), False
I get the date in b2 (no city/state/zip)
I need to be able to select the source file since the filename will not be
known to hard code it. Any help is greatly appreciated!
Christy
and help form this forum I got the code to work except I am not getting the
data I expect.
On the Saturday sheet, cell b2 contains a date and cell b3 has city/state/zip
Sub GetData_Example2()
Dim SaveDriveDir As String, MyPath As String
Dim FName As Variant
SaveDriveDir = CurDir
MyPath = Application.DefaultFilePath 'or use "C:\Data"
ChDrive MyPath
ChDir MyPath
FName = Application.GetOpenFilename(filefilter:="Excel Files, *.xls")
If FName = False Then
'do nothing
Else
****When I run either****
GetData FName, "Saturday", "b2:b3", Sheets("Source").Range("b2"), False
Or
GetData FName, "Saturday", "b2:b3", Sheets("Source").Range("b2:b3"), False
I get the city/state/zip in b2 (no date)
When I run
GetData FName, "Saturday", "b1:b3", Sheets("Source").Range("b2:b3"), False
I get the date in b2 (no city/state/zip)
I need to be able to select the source file since the filename will not be
known to hard code it. Any help is greatly appreciated!
Christy