Can I now just increase ocell1 and ocell2 and it will change the cell?
Sam
Printable View
Can I now just increase ocell1 and ocell2 and it will change the cell?
Sam
If you increase via the oCellx objects.
oCell1 = Sheet1.Cells(1, 1)
oCell2 = Sheet1.Cells(2, 1)
I am having some trouble with the sheet1 my sheet that I want to use is "50w prod". How do I use that?
Also how do I declare oCell1 and oCell2 and what as?
Thanks So Far
Sam
Would something like this work:
VB Code:
Dim osht1 As myExcel.Worksheet osht1 = DirectCast(oVidWB.Sheets("50w prod"), myExcel.Worksheet)
I think cells are declared as a Range? Really not sure about this bit:
VB Code:
Dim oCell1 As Excel.Range oCell1 = CType(osht1.Cells(1, 1), Excel.Range)
Yes, cells are a range, either a same cell range or a range of cells.
Single line of code...
VB Code:
Dim oRange As Excel.Range = DirectCast(oSht.Cells(1, 1), Excel.Range)