Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have the following code which works perfectly on my office computer. I
sent it to the co-worker I made it for who is attached to the LAN and it crashes on the line: ChDrive MyPath Does anyone have any idea what the problem is or how I can fix it. We commented out that line and it crashed on the next on and we commented out that line and it crashed on the next one. Sub GetDataFromClosedWB() Dim SaveDriveDir As String, MyPath As String Dim FName As Variant Application.ScreenUpdating = False Application.Calculation = xlCalculationManual 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 'Get Fridays date and Office city/state/zip GetData FName, "Saturday", "b1:b2", Sheets("Source").Range("b2"), False GetData FName, "Saturday", "b2:b3", Sheets("Source").Range("b3"), False End If Application.ScreenUpdating = True Application.Calculation = xlCalculationAutomatic ChDrive SaveDriveDir ChDir SaveDriveDir End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copy data from a closed workbook (ADO) | Excel Programming | |||
copy data from a closed workbook | Excel Programming | |||
Possible to copy sheets into another (closed!) workbook? | Excel Discussion (Misc queries) | |||
copy worksheet from closed workbook to active workbook using vba | Excel Worksheet Functions | |||
How to copy a range to a closed workbook | Excel Programming |