Hi All,
Not sure if this is possible but thought I would ask and see if anyone knows a way of doing it.
I have made a a spreadsheet for imputting payments for our clients which has several buttons with Macros that turns the information that is put into the spreadsheet into reorts and CSV file which are then uploaded to another system. I am trying to create a macro for a button which adds in a new tab (each individual client has it's own tab) which I have managed to do. The only issue is that the report and CSV macros copy the information from each individual tab (i'm sure there is a neater/simpler way of doing it but it works for me so far).
My question is is there a way of writing part of the new customer code that will add in a new section of code in the reports and CSV modules, which will read the name of the new client that has been added? Obviously I can just add the code in manually however I am trying to make it automated in case I am not in the office and my co-workers need to add a new client for a payment.
To give you an example of what the code would look like that would need to be added it looks something like this:
Sheets("Client Name").Select - This would need to be the name of the new client that is added in
Range("E150:A3").Select
Application.CutCopyMode = False
Selection.Copy
Windows("Supplier Import.csv").Activate
Range("A1").Select
ActiveSheet.Paste
Windows("Payroll Import Spreadsheet.xlsm").Activate
Sheets("Client Name").Select
Range("k150:g3").Select
Application.CutCopyMode = False
Selection.Copy
Windows("Supplier Import.csv").Activate
Range("A300").Select
ActiveSheet.Paste
Windows("Payroll Import Spreadsheet.xlsm").Activate
Hope that makes sense - any further clarification let me know!
Cheers
Not sure if this is possible but thought I would ask and see if anyone knows a way of doing it.
I have made a a spreadsheet for imputting payments for our clients which has several buttons with Macros that turns the information that is put into the spreadsheet into reorts and CSV file which are then uploaded to another system. I am trying to create a macro for a button which adds in a new tab (each individual client has it's own tab) which I have managed to do. The only issue is that the report and CSV macros copy the information from each individual tab (i'm sure there is a neater/simpler way of doing it but it works for me so far).
My question is is there a way of writing part of the new customer code that will add in a new section of code in the reports and CSV modules, which will read the name of the new client that has been added? Obviously I can just add the code in manually however I am trying to make it automated in case I am not in the office and my co-workers need to add a new client for a payment.
To give you an example of what the code would look like that would need to be added it looks something like this:
Sheets("Client Name").Select - This would need to be the name of the new client that is added in
Range("E150:A3").Select
Application.CutCopyMode = False
Selection.Copy
Windows("Supplier Import.csv").Activate
Range("A1").Select
ActiveSheet.Paste
Windows("Payroll Import Spreadsheet.xlsm").Activate
Sheets("Client Name").Select
Range("k150:g3").Select
Application.CutCopyMode = False
Selection.Copy
Windows("Supplier Import.csv").Activate
Range("A300").Select
ActiveSheet.Paste
Windows("Payroll Import Spreadsheet.xlsm").Activate
Hope that makes sense - any further clarification let me know!
Cheers