Jagdev Singh
Active Member
Hi Experts
I have a doubt. Is it possible to use the code to inform the macro file which sheet (1, 2, and 3)/dynamic ally to be pulled as a input file from a common folder. Say in code instead of
Set ws = wb.Worksheets(1)
Which says to consider sheet1 from the workbook and I want to inform the macro to pull the sheet depends upon the cell value in the macro file.
Somewhat like this as an example. It is practically not going to work just trying to clarify my concerned
Set ws = wb.Worksheets(ActiveWorkbook.Sheets(2).Range("E8").Value)
I will add a number whatever 1, 2, 3 in the cell E8 and the code will consider that sheet as an input.
Regards,
JD
I have a doubt. Is it possible to use the code to inform the macro file which sheet (1, 2, and 3)/dynamic ally to be pulled as a input file from a common folder. Say in code instead of
Set ws = wb.Worksheets(1)
Which says to consider sheet1 from the workbook and I want to inform the macro to pull the sheet depends upon the cell value in the macro file.
Somewhat like this as an example. It is practically not going to work just trying to clarify my concerned
Set ws = wb.Worksheets(ActiveWorkbook.Sheets(2).Range("E8").Value)
I will add a number whatever 1, 2, 3 in the cell E8 and the code will consider that sheet as an input.
Regards,
JD