Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I opened a comma separated text file in vba by first recording a macro.When I run the macro the import of the values happens as expected. When I activate the Workbook and type "?Activeworkbook.name" in the Immediate window, it shows the name of the workbook. However, when I type "?Activeworkbook.Range("a1").value", it returns Error 438 "Object doesn't return this property or method". I need to read the values in the imported workbook. Please help. Thanks in Advance for the Help. Regards, Raj |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
range isn't an object in the workbook, its in the worksheetm, so
?activeworkbook.activesheet.range("A1") "Raj" wrote: Hi, I opened a comma separated text file in vba by first recording a macro.When I run the macro the import of the values happens as expected. When I activate the Workbook and type "?Activeworkbook.name" in the Immediate window, it shows the name of the workbook. However, when I type "?Activeworkbook.Range("a1").value", it returns Error 438 "Object doesn't return this property or method". I need to read the values in the imported workbook. Please help. Thanks in Advance for the Help. Regards, Raj |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
Maybe if you define the sheet you want MyVal = ActiveWorkbook.Sheets("Sheet2").Range("a1").Value Mike "Raj" wrote: Hi, I opened a comma separated text file in vba by first recording a macro.When I run the macro the import of the values happens as expected. When I activate the Workbook and type "?Activeworkbook.name" in the Immediate window, it shows the name of the workbook. However, when I type "?Activeworkbook.Range("a1").value", it returns Error 438 "Object doesn't return this property or method". I need to read the values in the imported workbook. Please help. Thanks in Advance for the Help. Regards, Raj |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On 3 Sep, 16:14, Mike H wrote:
Hi, Maybe if you define the sheet you want MyVal = ActiveWorkbook.Sheets("Sheet2").Range("a1").Value Mike "Raj" wrote: Hi, I opened a comma separated text file in vba by first recording a macro.When I run the macro the import of the values happens as expected. When I activate the Workbook and type "?Activeworkbook.name" in the Immediate window, it shows the name of the workbook. However, when I type "?Activeworkbook.Range("a1").value", it returns Error 438 "Object doesn't return this property or method". I need to read the values in the imported workbook. Please help. Thanks in Advance for the Help. Regards, Raj Hi Patrick/Mike, Thanks a ton. Was missing the obvious :) Regards, Raj |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Saving sheets as tab delimited text files | Excel Programming | |||
Macro to open *.dat files and save as .txt (comma delimited text files) | Excel Programming | |||
Text to Columns in excel for delimited files - allow trimming opt. | New Users to Excel | |||
Consolidating tab-delimited text files | Excel Programming | |||
Saving spreadsheets as delimited text files | Excel Programming |