Hi everyone.
I'm having a hard time coding this one.
My objective is to select the sheet name based on a cell value from another work book.
Say, in workbook1, range(a1)= d-4
Then i want sheet(d-4) opened in workbook2.
The catch is, i want to dynamically do it.
That is, once sheet(d-4) is opened i would go back to workbook1 then open again the sheet in workbook2 based on workbook1's range(a2).
My code goes like this:
Dim a as integer
Dim detail as string
Do until isempty(cells(a,1))
Detail=cells(a,1).value
Workbooks(workbook2).sheet(detail).range("a1").select
a=a+1
Loop
Ive tried debugging it and seems hopeless.
Please help. Thanks in advance
I'm having a hard time coding this one.
My objective is to select the sheet name based on a cell value from another work book.
Say, in workbook1, range(a1)= d-4
Then i want sheet(d-4) opened in workbook2.
The catch is, i want to dynamically do it.
That is, once sheet(d-4) is opened i would go back to workbook1 then open again the sheet in workbook2 based on workbook1's range(a2).
My code goes like this:
Dim a as integer
Dim detail as string
Do until isempty(cells(a,1))
Detail=cells(a,1).value
Workbooks(workbook2).sheet(detail).range("a1").select
a=a+1
Loop
Ive tried debugging it and seems hopeless.
Please help. Thanks in advance
