If the other workbook is open it would look like:
Code:
Mystring = Workbooks("MyWorkbook").Worksheets("sheet1").Cells(1, 2).Value
Where in cells "1" represents the row, and "2" represents the column.
You could go through a column by using something like:
Code:
For X = 1 to MyLastRow
Mystring(X) = Workbooks("MyWorkbook").Worksheets("sheet1").Cells(1, X).Value
Next X
Or you could go through a range like:
Code:
For X = 1 to MyLastRow
For Y = 1 to 5
Mystring(X,Y) = Workbooks ("MyWorkbook").Worksheets("sheet1").Cells(1, X).Value
Next Y
Next X
You could also do a set if you use it a lot:
Code:
Set DATASHEET = Workbooks("Book6").Worksheets("sheet1")
mystring = DATASHEET.Cells(1, 2).Value
Or you could just activate the Workbook for a second.....
Code:
Workbooks("Book19").activate
Mystring = Cells(1,2).value
Workbook("MacroWorkbook").activate