T
Trever B
Hi,
Thanks in advance
What I have at present looks at cells A1 G2 & F3.
What i Need is to have a loop that looks at just a row, lets say row 4 ie
A4,B4, C4 all the way to the end. Not sure I how I refer it cells in a loop
situation and (More to the point where should I be looking to find out)
Dim objBook As Object
Dim objSheet As Object
Set objBook = GetObject("C:\ExcellFiles\Test_Case.xls")
For Each objSheet In objBook.Worksheets 'each worksheet
With objSheet
WorkSheet = .Name
Range = .UsedRange.Address
CellA1 = .UsedRange.Cells(1, 1).formula
CellF3 = .UsedRange.Cells(3, 6).formula
CellG2 = .UsedRange.Cells(2, 7).formula
End With
'do work here
Next
Set objSheet = Nothing
objBook.Close False
Set objBook = Nothing
Trev
Thanks in advance
What I have at present looks at cells A1 G2 & F3.
What i Need is to have a loop that looks at just a row, lets say row 4 ie
A4,B4, C4 all the way to the end. Not sure I how I refer it cells in a loop
situation and (More to the point where should I be looking to find out)
Dim objBook As Object
Dim objSheet As Object
Set objBook = GetObject("C:\ExcellFiles\Test_Case.xls")
For Each objSheet In objBook.Worksheets 'each worksheet
With objSheet
WorkSheet = .Name
Range = .UsedRange.Address
CellA1 = .UsedRange.Cells(1, 1).formula
CellF3 = .UsedRange.Cells(3, 6).formula
CellG2 = .UsedRange.Cells(2, 7).formula
End With
'do work here
Next
Set objSheet = Nothing
objBook.Close False
Set objBook = Nothing
Trev