Help with delimited text files

  • Thread starter Thread starter Raj
  • Start date Start date
R

Raj

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
 
range isn't an object in the workbook, its in the worksheetm, so

?activeworkbook.activesheet.range("A1")
 
Hi,

Maybe if you define the sheet you want

MyVal = ActiveWorkbook.Sheets("Sheet2").Range("a1").Value

Mike
 
Hi,

Maybe if you define the sheet you want

MyVal = ActiveWorkbook.Sheets("Sheet2").Range("a1").Value

Mike

Hi Patrick/Mike,

Thanks a ton. Was missing the obvious :)

Regards,
Raj
 
Back
Top