Hi there...I’m hoping someone can help me out with a macro im trying to create.
First of all….a bit of background.
I'm currently in the process of finalising a workbook that I’ve been developing, which I will be using to analysis the financial performance of a number of suppliers.
So far the workbook contains a couple of summary pages and around 50 worksheets that are generically the same layout & formatting. Each of the 50 worksheets are then used to capture specific information for a particular supplier.
Certain data entries (supplier names, sub totals, dates, etc etc) on the worksheets are absolute referenced on the summary sheets, and all of the worksheets are password protected to safeguard formulas, with certain cells left unprotected to allow user input.
So…..based on the above background, here’s my current dilemma
I’m trying to develop a worksheet specific set of macros, which will allow a user to insert rows (complete with formatting and formulas). Each worksheet needs five macros to insert rows in specific locations (i.e. the last lines before a five individual subtotal of a sub-section, so that they then import into an overall sub-total of a section).
A jpg image of one of these typical worksheets has been posted here
http://i28.photobucket.com/albums/c201/valenuk1/SCEFC.jpg
So far I have been able to record a macro to carry out this task on worksheet, as detailed below. I have also indicated where the macro buttons will be, whereby I wish to provide a user the facility to insert a row.
My macro so far is as follows.
Sub InsertRow1()
Row1 Macro
Macro recorded 16/11/2005
ActiveSheet.Unprotect Password:="XXXX"
ActiveWindow.LargeScroll Down:=1
Rows("37:37").Select
Selection.Copy
Selection.Insert Shift:=xlDown
Application.CutCopyMode = False
Range("E38").Select
ActiveSheet.Protect Password:="XXXX"
End Sub
I know that I will have develop 4 more parts to this macro to cater for the buttons that are indicated on the jpg image, but the overall problem Im having is that the macro is applied to the entire workbook, which is not exactly what I need as the sub-totals for each section will appear in different locations on the other 49 sheets, which is fully dependant on the amount of info that is inserted by the user onto the worksheets.
Therefore I need to understand how to develop a worksheet specific set of macro’s
I know that above may have rambled on a bit, but I thought it best to explain the assistance that I’m hoping someone here will be able to provide me with.
If you need to know anything else, please leave a PM.
Thanks in advance
Valenuk1....
First of all….a bit of background.
I'm currently in the process of finalising a workbook that I’ve been developing, which I will be using to analysis the financial performance of a number of suppliers.
So far the workbook contains a couple of summary pages and around 50 worksheets that are generically the same layout & formatting. Each of the 50 worksheets are then used to capture specific information for a particular supplier.
Certain data entries (supplier names, sub totals, dates, etc etc) on the worksheets are absolute referenced on the summary sheets, and all of the worksheets are password protected to safeguard formulas, with certain cells left unprotected to allow user input.
So…..based on the above background, here’s my current dilemma
I’m trying to develop a worksheet specific set of macros, which will allow a user to insert rows (complete with formatting and formulas). Each worksheet needs five macros to insert rows in specific locations (i.e. the last lines before a five individual subtotal of a sub-section, so that they then import into an overall sub-total of a section).
A jpg image of one of these typical worksheets has been posted here
http://i28.photobucket.com/albums/c201/valenuk1/SCEFC.jpg
So far I have been able to record a macro to carry out this task on worksheet, as detailed below. I have also indicated where the macro buttons will be, whereby I wish to provide a user the facility to insert a row.
My macro so far is as follows.
Sub InsertRow1()
Row1 Macro
Macro recorded 16/11/2005
ActiveSheet.Unprotect Password:="XXXX"
ActiveWindow.LargeScroll Down:=1
Rows("37:37").Select
Selection.Copy
Selection.Insert Shift:=xlDown
Application.CutCopyMode = False
Range("E38").Select
ActiveSheet.Protect Password:="XXXX"
End Sub
I know that I will have develop 4 more parts to this macro to cater for the buttons that are indicated on the jpg image, but the overall problem Im having is that the macro is applied to the entire workbook, which is not exactly what I need as the sub-totals for each section will appear in different locations on the other 49 sheets, which is fully dependant on the amount of info that is inserted by the user onto the worksheets.
Therefore I need to understand how to develop a worksheet specific set of macro’s
I know that above may have rambled on a bit, but I thought it best to explain the assistance that I’m hoping someone here will be able to provide me with.
If you need to know anything else, please leave a PM.
Thanks in advance
Valenuk1....