Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I found this code on Ron's site and it is exactly what I need. I was able to
download and run his example just fine but when I put the exact code in my workbook I get 'Subscript out of range'. I pasted the functions in one module and the macros in another just like in the example. I have not even tried to modify the from and to ranges yet. Any help will be greatly appreciated. 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 GetData FName, "Sheet1", "A1:C5", Sheets("Sheet1").Range("A1"), False End If ChDrive SaveDriveDir ChDir SaveDriveDir End Sub Christy |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Help...Code to copy sheet from closed workbook | Excel Discussion (Misc queries) | |||
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 | |||
copy to a Closed workbook. whith Path . | Excel Programming | |||
How to copy a range to a closed workbook | Excel Programming |