Hello,
I am opening new excel file using my current excel file (in which I have wrote macro)
I can read the current excel file total number of rows using following line
totalrow = Application.WorksheetFunction.CountA(Range("A:A"))
but when I used same to count rows for new open excel it is not working
Set objexcel = CreateObject("Excel.Application")
objexcel.Visible = True
Set objworkbook = objexcel.Workbooks.Open("C:\tesxt\text.xls")
Set objworksheet = objworkbook.Worksheets(1)
objworksheet.Activate
totalNewRow = objexcel.WorksheetFunction.CountA(Range("A:A"))
following error appears "unable to get the CountA property of the WorksheetFunction class"
Thanks in advance for your suggestions
Regards,
Nitin Salunkhe
Bookmarks