Hi all, I have a number of sheets within a number of workbooks that are all the same in terms of format. These sheets need to be formatted regularly, and in exactly the same way, to make way for new data.
Now, instead of writing a huge piece of code and copying and pasting the same code over and over again to format the sheets, I wrote two modules: one is the base module that activates each sheet and then calls the one, singular format module and the other is the format module itself:
E.g.
Sub Base_Module()
Sheets("Sheet1").Activate
Format_Module
Sheets("Sheet2").Activate
Format_Module
Sheets("Sheet3").Activate
Format_Module
etc etc
End Sub
My problem is the inefficient sheet activation. I don't seem to be able to use:
With Worksheets ("Sheet1")
Format_Module
With Worksheets ("Sheet2")
Format_Module
etc etc
because the module runs over the current, active sheet and not the one declared.
Can someone point me in the right direction please, or is there no way to call another module without 'physically' activating the sheet?
Many thanks.
R
Now, instead of writing a huge piece of code and copying and pasting the same code over and over again to format the sheets, I wrote two modules: one is the base module that activates each sheet and then calls the one, singular format module and the other is the format module itself:
E.g.
Sub Base_Module()
Sheets("Sheet1").Activate
Format_Module
Sheets("Sheet2").Activate
Format_Module
Sheets("Sheet3").Activate
Format_Module
etc etc
End Sub
My problem is the inefficient sheet activation. I don't seem to be able to use:
With Worksheets ("Sheet1")
Format_Module
With Worksheets ("Sheet2")
Format_Module
etc etc
because the module runs over the current, active sheet and not the one declared.
Can someone point me in the right direction please, or is there no way to call another module without 'physically' activating the sheet?
Many thanks.
R