Good Day Ladies And Gents.
I need to save a worksheet out of a workbook depending on the data entered into cell G24 (for example)
The reason is that I process the Jobcards for my company as well as the Manufacturing Certificates for each job.
Each of these files have a certain set of documents that go with it (which I can save already into a new sheet).
BUT, each type of product has a certain ISO Document that goes with it.
example :
Product A would get ISO doc 1234
Product B would get ISO doc 1235
This is what i have:
Workbook "Alpha"
sheets : "Front_Page", "Job_Card", "Collection", "GB_Build", "Regdoc_Grn,"
(then here come the variable sheets):
sheets : "123", "124", "125", "126", "127"
How my macro works is as follows :
Application.ScreenUpdating = False
'Dim sNatisDoc As String (Coding I'm struggling with)
'sNatisDoc = Range("C24").Value (Coding I'm struggling with)
Sheets(Array("Front_Page", "Job_Card", "Collection", "GB_Build", "Regdoc_Grn", "Regdoc_Bl")).Select
Sheets(Array("Front_Page", "Job_Card", "Collection", "GB_Build", "Regdoc_Grn", "Regdoc_Bl")).Copy
(the above needs to change to something like
'Sheets(Array("Front_Page", "Job_Card", "Collection", "GB_Build", "Regdoc_Grn", "Regdoc_Bl", "sNatisDoc")).Select
'Sheets(Array("Front_Page", "Job_Card", "Collection", "GB_Build", "Regdoc_Grn", "Regdoc_Bl", "sNatisDoc")).Copy
ThisFile = Range("H3").Value
ActiveSheet.SaveAs Filename:="path\" & ThisFile & ".xls"
Application.ScreenUpdating = True
ActiveWorkbook.Close
Range("G3").Value = 1 + Range("G3").Value
As you can see that I have the array sorted out.
What I'm struggling with is defining what sheet to save according to the data entered in "C24"
If you masters could please please help me with this my life would become a million times easier.
Regards
Chin
I need to save a worksheet out of a workbook depending on the data entered into cell G24 (for example)
The reason is that I process the Jobcards for my company as well as the Manufacturing Certificates for each job.
Each of these files have a certain set of documents that go with it (which I can save already into a new sheet).
BUT, each type of product has a certain ISO Document that goes with it.
example :
Product A would get ISO doc 1234
Product B would get ISO doc 1235
This is what i have:
Workbook "Alpha"
sheets : "Front_Page", "Job_Card", "Collection", "GB_Build", "Regdoc_Grn,"
(then here come the variable sheets):
sheets : "123", "124", "125", "126", "127"
How my macro works is as follows :
Application.ScreenUpdating = False
'Dim sNatisDoc As String (Coding I'm struggling with)
'sNatisDoc = Range("C24").Value (Coding I'm struggling with)
Sheets(Array("Front_Page", "Job_Card", "Collection", "GB_Build", "Regdoc_Grn", "Regdoc_Bl")).Select
Sheets(Array("Front_Page", "Job_Card", "Collection", "GB_Build", "Regdoc_Grn", "Regdoc_Bl")).Copy
(the above needs to change to something like
'Sheets(Array("Front_Page", "Job_Card", "Collection", "GB_Build", "Regdoc_Grn", "Regdoc_Bl", "sNatisDoc")).Select
'Sheets(Array("Front_Page", "Job_Card", "Collection", "GB_Build", "Regdoc_Grn", "Regdoc_Bl", "sNatisDoc")).Copy
ThisFile = Range("H3").Value
ActiveSheet.SaveAs Filename:="path\" & ThisFile & ".xls"
Application.ScreenUpdating = True
ActiveWorkbook.Close
Range("G3").Value = 1 + Range("G3").Value
As you can see that I have the array sorted out.
What I'm struggling with is defining what sheet to save according to the data entered in "C24"
If you masters could please please help me with this my life would become a million times easier.
Regards
Chin