Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I have a worksheet 1 in a workbook A. I have a code to move the worksheet 1 into a new workbook. I want to name the new workbook using the two pieces of data from cells A1 and C1 from Workbook A. For example, cells A1 and C1 have ABC and 123 in Workbook A, respective. Then the new workbook name will be "ABC123.xls". How should I reference Cells A1 and C1 in my code in order to name the new file? I tried using: FName1 = Worksheets("1").Range("A1") FName2 = Worksheets("1").Range("C1") When I run the code, I got an error message that file "ABC123.xls" can not be accessed. It didn't save the file, and the new workbook is left open. Please help. Thanks. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Extracting single piece of data | Excel Discussion (Misc queries) | |||
Extracting single piece of data | Excel Discussion (Misc queries) | |||
Extracting single piece of data | Excel Discussion (Misc queries) | |||
macro to import file (help with a piece of code) | Excel Programming | |||
Run piece of code for each line of data | Excel Programming |