I have pieced together code from here and there to pull data from a feed I call "Data" (worksheet). All my modules work as <gs id="ea50d9b8-0de7-49ac-b37b-2f624d15ea47" ginger_software_uiphraseguid="7651df4e-98a6-4f37-97d3-b303aec4416c" class="GINGER_SOFTWARE_mark">Addins</gs> except the one below. The "<gs id="10038716-8a9e-4639-bb6e-e965f14f4a52" ginger_software_uiphraseguid="f752c9a9-8187-4c17-aea5-ffac0ed9a1e8" class="GINGER_SOFTWARE_mark">InsertSheet</gs>" module stops at adding the third sheet. So it builds the first sheet after "Data" and then it stops on the third sheet of the loop. [<gs id="0c2e8554-9946-484a-be82-a4403c0a5409" ginger_software_uiphraseguid="3ac1d6a0-8dcf-4355-b178-860dade050fc" class="GINGER_SOFTWARE_mark">Data</gs><gs id="0fcdb778-b3a2-405f-84cc-de15378f3e8c" ginger_software_uiphraseguid="3ac1d6a0-8dcf-4355-b178-860dade050fc" class="GINGER_SOFTWARE_mark">]</gs>[Sheet1<gs id="0dbae33b-86e7-43eb-ad93-e21b5fe9d687" ginger_software_uiphraseguid="3ac1d6a0-8dcf-4355-b178-860dade050fc" class="GINGER_SOFTWARE_mark">]</gs>[Sheet2].
I'm getting the following run-time error '1004'
Cannot rename a sheet <gs id="f13c8667-210e-4a18-a120-d2fd4a3acc15" ginger_software_uiphraseguid="8adb6e94-5835-4515-bfcd-dc2df1097813" class="GINGER_SOFTWARE_mark">to</gs> the same name as another sheet, a referenced object library or workbook referenced by Visual Basic
When I step through the code it shows the Sheet1 name instead of Sheet2. So it is on the third loop.
P.S. The code below works as a module of the "Data" worksheet/workbook. Only fails when I make it <gs id="21885f83-f815-4dd0-a43b-e754f89b2038" ginger_software_uiphraseguid="f4cca5c6-88f7-4a70-951f-98a14914b60d" class="GINGER_SOFTWARE_mark">an</gs> <gs id="0c7d4a05-4223-4cd8-95cf-61611e739a73" ginger_software_uiphraseguid="f4cca5c6-88f7-4a70-951f-98a14914b60d" class="GINGER_SOFTWARE_mark">addin</gs>.
[CODE<gs id="260959ef-112c-4be3-a4ea-70fe2fecdc2e" ginger_software_uiphraseguid="2052f4a4-c8d1-4127-b4cc-c0b696951873" class="GINGER_SOFTWARE_mark">]</gs>Private Sub InsertSheet<gs id="9dec52d1-66b1-4286-8240-430780c12f09" ginger_software_uiphraseguid="2052f4a4-c8d1-4127-b4cc-c0b696951873" class="GINGER_SOFTWARE_mark">(</gs><gs id="15df80cc-0f13-4074-ac88-d8770d932b71" ginger_software_uiphraseguid="2052f4a4-c8d1-4127-b4cc-c0b696951873" class="GINGER_SOFTWARE_mark">shName</gs> As String, ByRef sh As Worksheet, ByRef ws As Worksheet, DDNameColumn As String) Dim <gs id="454e8654-f620-43c2-9469-9bcd30d29285" ginger_software_uiphraseguid="2052f4a4-c8d1-4127-b4cc-c0b696951873" class="GINGER_SOFTWARE_mark">wsRow</gs> As Long
Worksheets<gs id="81b6c186-f971-401f-b00b-468f414ea113" ginger_software_uiphraseguid="c68827cb-c639-42df-8156-c3a51eca1a3b" class="GINGER_SOFTWARE_mark">.</gs>Add<gs id="59a9187a-ae6e-4b9f-9be6-f1d2cccd2676" ginger_software_uiphraseguid="c68827cb-c639-42df-8156-c3a51eca1a3b" class="GINGER_SOFTWARE_mark">(</gs>After<gs id="fb36351a-80cd-4e9b-9cd0-da4cab1aa265" ginger_software_uiphraseguid="c68827cb-c639-42df-8156-c3a51eca1a3b" class="GINGER_SOFTWARE_mark">:</gs>=Worksheets<gs id="feb7b660-9e0d-4bb8-a056-05b6dd316813" ginger_software_uiphraseguid="c68827cb-c639-42df-8156-c3a51eca1a3b" class="GINGER_SOFTWARE_mark">(</gs>Worksheets<gs id="71214d1b-9447-4f94-afdf-9f608ddf31d2" ginger_software_uiphraseguid="c68827cb-c639-42df-8156-c3a51eca1a3b" class="GINGER_SOFTWARE_mark">.</gs>Count))<gs id="04b63bb6-5089-4929-9633-64f0fc3bb88e" ginger_software_uiphraseguid="c68827cb-c639-42df-8156-c3a51eca1a3b" class="GINGER_SOFTWARE_mark">.</gs>Name = <gs id="0487491e-03ef-4c7b-89c3-5ac0b97f7c02" ginger_software_uiphraseguid="c68827cb-c639-42df-8156-c3a51eca1a3b" class="GINGER_SOFTWARE_mark">shName</gs>
With ActiveSheet<gs id="9dbbcf96-c9bc-4beb-ba37-af371d22aba7" ginger_software_uiphraseguid="38b80811-fb4f-42f5-80d3-e1900dc92461" class="GINGER_SOFTWARE_mark">.</gs>PageSetup
<gs id="654d6384-f36b-4fcb-9c9e-b01eb104ef01" ginger_software_uiphraseguid="b1555d7d-4eb4-4e46-93df-2c55f06b12c5" class="GINGER_SOFTWARE_mark">.</gs><gs id="51025e55-f7fc-4fbc-b40c-c0d441c9f738" ginger_software_uiphraseguid="b1555d7d-4eb4-4e46-93df-2c55f06b12c5" class="GINGER_SOFTWARE_mark">CenterHeader</gs> = "<gs id="3794b5a1-d1b2-4e00-9249-60e49ff7d5bf" ginger_software_uiphraseguid="b1555d7d-4eb4-4e46-93df-2c55f06b12c5" class="GINGER_SOFTWARE_mark">CompanyA</gs> " & <gs id="8582f0fc-62f4-44ec-8c95-8475d27b20c1" ginger_software_uiphraseguid="b1555d7d-4eb4-4e46-93df-2c55f06b12c5" class="GINGER_SOFTWARE_mark">shName</gs> & Chr<gs id="adfc4bee-b228-4c9b-8352-19fd1ffa7685" ginger_software_uiphraseguid="b1555d7d-4eb4-4e46-93df-2c55f06b12c5" class="GINGER_SOFTWARE_mark">(</gs>10) & "As of FY " & <gs id="49e1ef04-adab-45ab-9747-97bb49396a35" ginger_software_uiphraseguid="b1555d7d-4eb4-4e46-93df-2c55f06b12c5" class="GINGER_SOFTWARE_mark">uPeriod</gs>
<gs id="34566719-c234-4119-8ca6-a77ecba88a61" ginger_software_uiphraseguid="59491245-0de5-4e87-8367-c61b3d141fc6" class="GINGER_SOFTWARE_mark">.</gs><gs id="5d6f810b-d7e5-473d-b380-2efc2f4331f0" ginger_software_uiphraseguid="59491245-0de5-4e87-8367-c61b3d141fc6" class="GINGER_SOFTWARE_mark">CenterFooter</gs> = "Page &P of &N"
<gs id="65547007-3ecb-42cc-aac9-edbaedd0aba0" ginger_software_uiphraseguid="398c9a85-f55a-4f72-9cf3-e5e1d1fdf78a" class="GINGER_SOFTWARE_mark">.</gs>Orientation = <gs id="7724ac7c-a0da-47fe-90c8-7cc480633254" ginger_software_uiphraseguid="398c9a85-f55a-4f72-9cf3-e5e1d1fdf78a" class="GINGER_SOFTWARE_mark">xlLandscape</gs> ' or <gs id="28ac980d-06b8-49e6-bae8-f87af4f22f64" ginger_software_uiphraseguid="398c9a85-f55a-4f72-9cf3-e5e1d1fdf78a" class="GINGER_SOFTWARE_mark">xlPortrait</gs>
<gs id="85e2e0d7-1e01-4d05-b4bc-165aa34a48d8" ginger_software_uiphraseguid="8dd19fd2-1f77-419e-a5a4-77c8b67b4a81" class="GINGER_SOFTWARE_mark">.</gs><gs id="655d8c0e-1cfd-4422-93b0-ca09dc252a3f" ginger_software_uiphraseguid="8dd19fd2-1f77-419e-a5a4-77c8b67b4a81" class="GINGER_SOFTWARE_mark">PaperSize</gs> = <gs id="4af30296-d437-4c5e-ae7c-a4d50ec77b55" ginger_software_uiphraseguid="8dd19fd2-1f77-419e-a5a4-77c8b67b4a81" class="GINGER_SOFTWARE_mark">xlPaperLegal</gs>
End With
<gs id="a6df46cf-048d-404a-9425-de99e558b2ae" ginger_software_uiphraseguid="65334c28-2649-4d5e-98ce-550c4c805e75" class="GINGER_SOFTWARE_mark">sh</gs><gs id="bc27cfcb-ed06-49de-b0ae-03e77eef4c31" ginger_software_uiphraseguid="65334c28-2649-4d5e-98ce-550c4c805e75" class="GINGER_SOFTWARE_mark">.</gs>Rows<gs id="746e11c1-c987-4f0c-8cd6-0bad19b724c0" ginger_software_uiphraseguid="65334c28-2649-4d5e-98ce-550c4c805e75" class="GINGER_SOFTWARE_mark">(</gs>"1:1")<gs id="610ecdd0-ddfa-493e-ba0b-5fc667528d31" ginger_software_uiphraseguid="65334c28-2649-4d5e-98ce-550c4c805e75" class="GINGER_SOFTWARE_mark">.</gs>Copy
Set <gs id="de0eeec0-2f0e-4fd7-beac-83c116aee002" ginger_software_uiphraseguid="d7f85aad-1f90-4213-89c1-4709cd4a38a2" class="GINGER_SOFTWARE_mark">ws</gs> = Sheets<gs id="a31b7af4-1e90-4ae1-94f8-24923ba3cc73" ginger_software_uiphraseguid="d7f85aad-1f90-4213-89c1-4709cd4a38a2" class="GINGER_SOFTWARE_mark">(</gs>Worksheets<gs id="66f586b3-aebb-4312-8c10-450a17559369" ginger_software_uiphraseguid="d7f85aad-1f90-4213-89c1-4709cd4a38a2" class="GINGER_SOFTWARE_mark">.</gs>Count)
<gs id="8fff72cb-d470-4ba8-816a-e6bfbc2b3588" ginger_software_uiphraseguid="02343074-5285-42ea-a902-bbca508b69bf" class="GINGER_SOFTWARE_mark">ws</gs><gs id="6a9e6f3c-5157-40fb-8c3a-40905cc36410" ginger_software_uiphraseguid="02343074-5285-42ea-a902-bbca508b69bf" class="GINGER_SOFTWARE_mark">.</gs>Rows<gs id="a1a925a5-812e-4dd2-9b44-3505520717e6" ginger_software_uiphraseguid="02343074-5285-42ea-a902-bbca508b69bf" class="GINGER_SOFTWARE_mark">(</gs>"1:1")<gs id="e3803e1b-475f-4a18-ab2d-aa06224fe631" ginger_software_uiphraseguid="02343074-5285-42ea-a902-bbca508b69bf" class="GINGER_SOFTWARE_mark">.</gs>PasteSpecial _
Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
Application<gs id="3676b8f5-b39c-454c-9627-b4f71f60b4d0" ginger_software_uiphraseguid="861b7725-e654-4be0-9b39-1cc22261740b" class="GINGER_SOFTWARE_mark">.</gs>CutCopyMode = False
End Sub<gs id="452bb3f6-0e13-4b45-853f-b33f2621457f" ginger_software_uiphraseguid="cd65760f-df9a-4aa2-b3e0-fa2c53bc6003" class="GINGER_SOFTWARE_mark">[</gs>/CODE]
Entire Module
[CODE<gs id="a38fd02b-9e3b-477c-81b9-92f822231809" ginger_software_uiphraseguid="3ea09bdd-2dff-431b-b7cc-9a0b1f7431bd" class="GINGER_SOFTWARE_mark">]</gs>Option <gs id="e7828031-a254-4080-adeb-07ff939a43f6" ginger_software_uiphraseguid="3ea09bdd-2dff-431b-b7cc-9a0b1f7431bd" class="GINGER_SOFTWARE_mark">ExplicitPublic</gs> <gs id="b59f0461-1543-4d32-b943-d167e7f2b034" ginger_software_uiphraseguid="3ea09bdd-2dff-431b-b7cc-9a0b1f7431bd" class="GINGER_SOFTWARE_mark">uPeriod</gs> As String
Sub PullDD<gs id="9b7f106a-fa4f-4f1a-ad74-2b862b551a12" ginger_software_uiphraseguid="456530b2-c71b-40e6-a89c-6c9fa81d6501" class="GINGER_SOFTWARE_mark">(</gs>)
Application<gs id="722d7800-dc0a-440b-a0ec-a25483c73305" ginger_software_uiphraseguid="3606a3d9-c2bd-43ea-ad74-76593b2a063e" class="GINGER_SOFTWARE_mark">.</gs>ScreenUpdating = False
Dim <gs id="1b2d35bf-7d84-4376-af97-7223a29bdcfe" ginger_software_uiphraseguid="b4829f05-7c1c-4f0d-a80b-39da49f46f23" class="GINGER_SOFTWARE_mark">shtName</gs> As String
Dim DDNameColumn As String
Dim <gs id="80dedbc1-ca26-449f-81d5-13c0dbb5633b" ginger_software_uiphraseguid="925d63c0-47a3-480d-a19c-705849171541" class="GINGER_SOFTWARE_mark">i</gs> As Long
Dim <gs id="36a9f364-cfbf-4bdb-8c3f-6cc97bf061c5" ginger_software_uiphraseguid="008c3857-3b0e-4526-8116-132a3e9d33c6" class="GINGER_SOFTWARE_mark">stRow</gs> As Long
Dim DD As String
Dim ws As Worksheet
Dim <gs id="8e808217-c0e3-4399-9df0-1a93bdcc06c9" ginger_software_uiphraseguid="f44367fe-1fee-4608-8aa4-87fbae8f6d38" class="GINGER_SOFTWARE_mark">sheetExist</gs> As Boolean
Dim sh As Worksheet
<gs id="86e7ce2d-165b-4dfc-8adf-44c37ca0f182" ginger_software_uiphraseguid="34d210bd-499f-4098-886b-833ac1e58aa1" class="GINGER_SOFTWARE_mark">shtName</gs> = "Data"
<gs id="99a05e67-cd81-4d63-a632-15200991b720" ginger_software_uiphraseguid="b445f916-1179-4633-ba83-afd8fd15a6e9" class="GINGER_SOFTWARE_mark">DDNameColumn</gs> = "D"
<gs id="faf328af-0e8d-4e1f-9360-479eaad0b3cf" ginger_software_uiphraseguid="b33e2511-b4c5-44f1-a2c7-5a55479adedd" class="GINGER_SOFTWARE_mark">stRow</gs> = 2
<gs id="c927926c-5a4b-43a9-95d0-158ac9bda7f9" ginger_software_uiphraseguid="a931f182-4338-42e6-a009-23514955b48b" class="GINGER_SOFTWARE_mark">PeriodInputBox</gs> <gs id="1e89c802-a4d7-41f5-845a-da3f70214d12" ginger_software_uiphraseguid="a931f182-4338-42e6-a009-23514955b48b" class="GINGER_SOFTWARE_mark">uPeriod</gs>
Set sh = Sheets<gs id="9823382d-c111-40cb-98d1-af7f949c5fa6" ginger_software_uiphraseguid="e06dd40d-8270-4bfe-825a-f86b39530dff" class="GINGER_SOFTWARE_mark">(</gs><gs id="33c6d272-6f48-42d3-9916-542fc22d2b47" ginger_software_uiphraseguid="e06dd40d-8270-4bfe-825a-f86b39530dff" class="GINGER_SOFTWARE_mark">shtName</gs>)
For <gs id="3c159a60-7b22-4232-945d-1cd6968820d5" ginger_software_uiphraseguid="46c4a9a9-f193-46d9-bc7c-57774c286ddb" class="GINGER_SOFTWARE_mark">i</gs> = <gs id="980ded5f-7414-4bc8-9c70-218ac7449e89" ginger_software_uiphraseguid="46c4a9a9-f193-46d9-bc7c-57774c286ddb" class="GINGER_SOFTWARE_mark">stRow</gs> To sh<gs id="40d945e4-8b31-46c7-934f-f8c4f706e2c1" ginger_software_uiphraseguid="46c4a9a9-f193-46d9-bc7c-57774c286ddb" class="GINGER_SOFTWARE_mark">.</gs>Range<gs id="76e89c05-c23b-4136-a49b-7b686eed6baa" ginger_software_uiphraseguid="46c4a9a9-f193-46d9-bc7c-57774c286ddb" class="GINGER_SOFTWARE_mark">(</gs>DDNameColumn & Rows<gs id="33af92f8-944b-4093-a51d-610dff524fa1" ginger_software_uiphraseguid="46c4a9a9-f193-46d9-bc7c-57774c286ddb" class="GINGER_SOFTWARE_mark">.</gs>Count)<gs id="69e33d5e-40f2-4d78-9a12-acb8d1893734" ginger_software_uiphraseguid="46c4a9a9-f193-46d9-bc7c-57774c286ddb" class="GINGER_SOFTWARE_mark">.</gs>End<gs id="23519f26-2c52-4927-9144-0a2982d1d8fe" ginger_software_uiphraseguid="46c4a9a9-f193-46d9-bc7c-57774c286ddb" class="GINGER_SOFTWARE_mark">(</gs><gs id="ceeb8325-b086-44bb-ba7c-42c65243083e" ginger_software_uiphraseguid="46c4a9a9-f193-46d9-bc7c-57774c286ddb" class="GINGER_SOFTWARE_mark">xlUp</gs>)<gs id="52d92ee2-5347-4598-aef0-ef4f9f2db409" ginger_software_uiphraseguid="46c4a9a9-f193-46d9-bc7c-57774c286ddb" class="GINGER_SOFTWARE_mark">.</gs>Row
DD = sh<gs id="3c4f2f71-05f7-4cd6-ab84-537ef92db91c" ginger_software_uiphraseguid="4ca995cd-dbc8-4d60-94d1-068a1ea4a553" class="GINGER_SOFTWARE_mark">.</gs>Range<gs id="f520f260-caea-40c1-b6a4-fda202d45320" ginger_software_uiphraseguid="4ca995cd-dbc8-4d60-94d1-068a1ea4a553" class="GINGER_SOFTWARE_mark">(</gs>DDNameColumn & <gs id="82e24fa1-0b38-4f61-b777-6a3b0bc7a56e" ginger_software_uiphraseguid="4ca995cd-dbc8-4d60-94d1-068a1ea4a553" class="GINGER_SOFTWARE_mark">i</gs>)<gs id="aa9f9003-df65-4d77-a3e9-f7282cfedae1" ginger_software_uiphraseguid="4ca995cd-dbc8-4d60-94d1-068a1ea4a553" class="GINGER_SOFTWARE_mark">.</gs>Value
For Each ws In ThisWorkbook<gs id="1618d0bd-00a2-4306-88cf-36f0c2cf4d3d" ginger_software_uiphraseguid="f89de04c-676d-4a5d-af8a-6f6b78898d02" class="GINGER_SOFTWARE_mark">.</gs>Sheets
If StrComp<gs id="f2887ec1-e8f5-478c-a245-87d839680cb5" ginger_software_uiphraseguid="08e665c1-feb7-4476-af0b-ac309aae05c3" class="GINGER_SOFTWARE_mark">(</gs><gs id="a8378eff-ca18-46b0-86f9-07a58ca78504" ginger_software_uiphraseguid="08e665c1-feb7-4476-af0b-ac309aae05c3" class="GINGER_SOFTWARE_mark">ws</gs><gs id="2da88bdb-fc8f-4651-9998-c1bae1a3d262" ginger_software_uiphraseguid="08e665c1-feb7-4476-af0b-ac309aae05c3" class="GINGER_SOFTWARE_mark">.</gs>Name, DD, <gs id="c8bf8f5e-1ac3-47a3-b04a-71573e3f3e06" ginger_software_uiphraseguid="08e665c1-feb7-4476-af0b-ac309aae05c3" class="GINGER_SOFTWARE_mark">vbTextCompare</gs>) = 0 Then
<gs id="2e2d2aff-324d-4762-8542-9b7a89c7227d" ginger_software_uiphraseguid="2afc6648-6164-4af8-8393-eb1c0f9fe38c" class="GINGER_SOFTWARE_mark">sheetExist</gs> = True
Exit For
End If
Next
If <gs id="35f5a95e-90f1-4cbf-a030-ffa7f4186308" ginger_software_uiphraseguid="0c1cb1d4-383f-4cc7-bec0-39a14a89392c" class="GINGER_SOFTWARE_mark">sheetExist</gs> Then
<gs id="3f1c555c-ef2b-48de-860d-88679381ef2d" ginger_software_uiphraseguid="4dabf9d1-ba30-4f64-bb9b-1c94996e7bd2" class="GINGER_SOFTWARE_mark">CopyRow</gs> <gs id="15721b1b-74bb-4207-826f-b8815b029c69" ginger_software_uiphraseguid="4dabf9d1-ba30-4f64-bb9b-1c94996e7bd2" class="GINGER_SOFTWARE_mark">i</gs>, sh, <gs id="73801af2-5c41-40de-9ee6-fbedd1f5f93d" ginger_software_uiphraseguid="4dabf9d1-ba30-4f64-bb9b-1c94996e7bd2" class="GINGER_SOFTWARE_mark">ws</gs>, DDNameColumn
Else
InsertSheet DD, sh, ws, DDNameColumn
Set <gs id="4a831a3d-e0a3-4763-929e-5332b9f3f746" ginger_software_uiphraseguid="07873a95-6a66-4ac1-8611-d9673320e319" class="GINGER_SOFTWARE_mark">ws</gs> = Sheets<gs id="692512d1-d169-49b4-8ca2-eb0a4234c972" ginger_software_uiphraseguid="07873a95-6a66-4ac1-8611-d9673320e319" class="GINGER_SOFTWARE_mark">(</gs>Worksheets<gs id="75cfe5b0-9d0b-4a2a-ae4a-096490e8c1a3" ginger_software_uiphraseguid="07873a95-6a66-4ac1-8611-d9673320e319" class="GINGER_SOFTWARE_mark">.</gs>Count)
<gs id="3ace72db-1389-46e3-b7db-48922ea9db22" ginger_software_uiphraseguid="d7703ca4-17c1-4bef-878f-a5cd372ff19d" class="GINGER_SOFTWARE_mark">CopyRow</gs> <gs id="8c574071-7d9c-4053-8d00-42d46d5d74d1" ginger_software_uiphraseguid="d7703ca4-17c1-4bef-878f-a5cd372ff19d" class="GINGER_SOFTWARE_mark">i</gs>, sh, <gs id="143b23cb-2dde-4008-b6b3-f7f4c28caf52" ginger_software_uiphraseguid="d7703ca4-17c1-4bef-878f-a5cd372ff19d" class="GINGER_SOFTWARE_mark">ws</gs>, DDNameColumn
ModifyHDR DD, sh, ws, DDNameColumn
End If
Reset <gs id="da583cd5-4909-466b-baa4-f21acd24cd58" ginger_software_uiphraseguid="2c127e6d-e969-496e-bc36-e79226d2e569" class="GINGER_SOFTWARE_mark">sheetExist</gs>
Next <gs id="8020849a-a107-4191-9d20-817e4e908588" ginger_software_uiphraseguid="59e7a1f1-44f3-49ce-823f-725f017f6b22" class="GINGER_SOFTWARE_mark">i</gs>
End Sub
Private Sub CopyRow<gs id="4a4d136f-7ebb-4f44-adbd-b253b45414ca" ginger_software_uiphraseguid="2d0b4956-0d56-4e97-8cdb-2f9b7e195571" class="GINGER_SOFTWARE_mark">(</gs><gs id="b433cabc-32ff-43f3-9f85-8ce14e566a8a" ginger_software_uiphraseguid="2d0b4956-0d56-4e97-8cdb-2f9b7e195571" class="GINGER_SOFTWARE_mark">i</gs> As Long, ByRef sh As Worksheet, ByRef ws As Worksheet, DDNameColumn As String)
Dim <gs id="b33605e3-2805-4b97-9bf0-1083286685bb" ginger_software_uiphraseguid="a892ff2b-0dad-451d-b132-5d7bbd2f74e1" class="GINGER_SOFTWARE_mark">wsRow</gs> As Long
<gs id="760f9a84-71f0-4d03-86ef-b6a91bc376db" ginger_software_uiphraseguid="b0ec8638-781c-46cd-a6c3-df824201b8d1" class="GINGER_SOFTWARE_mark">wsRow</gs> = <gs id="8cffed8f-9dec-476e-a47c-6f673f45c9dd" ginger_software_uiphraseguid="b0ec8638-781c-46cd-a6c3-df824201b8d1" class="GINGER_SOFTWARE_mark">ws</gs><gs id="43660bc7-2872-40fc-a9fb-8d0346345ab5" ginger_software_uiphraseguid="b0ec8638-781c-46cd-a6c3-df824201b8d1" class="GINGER_SOFTWARE_mark">.</gs>Range<gs id="1283aa67-81e5-4c1a-9c26-449b13bd9754" ginger_software_uiphraseguid="b0ec8638-781c-46cd-a6c3-df824201b8d1" class="GINGER_SOFTWARE_mark">(</gs>DDNameColumn & Rows<gs id="c46ff2a1-5a72-41a4-a866-0cfcd0035903" ginger_software_uiphraseguid="b0ec8638-781c-46cd-a6c3-df824201b8d1" class="GINGER_SOFTWARE_mark">.</gs>Count)<gs id="f8562061-830a-4a63-9818-7a97d4ae340d" ginger_software_uiphraseguid="b0ec8638-781c-46cd-a6c3-df824201b8d1" class="GINGER_SOFTWARE_mark">.</gs>End<gs id="5ad1d890-d1de-438e-b9d9-f9e31e2feb31" ginger_software_uiphraseguid="b0ec8638-781c-46cd-a6c3-df824201b8d1" class="GINGER_SOFTWARE_mark">(</gs><gs id="316b5d45-e2b7-4b34-a5af-5a3f9cce04d0" ginger_software_uiphraseguid="b0ec8638-781c-46cd-a6c3-df824201b8d1" class="GINGER_SOFTWARE_mark">xlUp</gs>)<gs id="b2bff7eb-3861-4786-9a67-22ff1a6b5e55" ginger_software_uiphraseguid="b0ec8638-781c-46cd-a6c3-df824201b8d1" class="GINGER_SOFTWARE_mark">.</gs>Row + 1
<gs id="8645940b-3d16-46d5-a4e9-e50f86993f0b" ginger_software_uiphraseguid="301fb163-845b-46c6-b99c-4a2dc35b3265" class="GINGER_SOFTWARE_mark">sh</gs><gs id="3ec2b641-7a46-4c8b-b905-0a651dbb4b13" ginger_software_uiphraseguid="301fb163-845b-46c6-b99c-4a2dc35b3265" class="GINGER_SOFTWARE_mark">.</gs>Rows<gs id="451bbf97-4bc6-4b29-967d-a276208058ca" ginger_software_uiphraseguid="301fb163-845b-46c6-b99c-4a2dc35b3265" class="GINGER_SOFTWARE_mark">(</gs><gs id="5b3d4f90-1ae2-4faf-8ecc-5aa940ca0d36" ginger_software_uiphraseguid="301fb163-845b-46c6-b99c-4a2dc35b3265" class="GINGER_SOFTWARE_mark">i</gs> & ":" & <gs id="ce7a9c16-3276-41be-b6dd-192cfa5f05fb" ginger_software_uiphraseguid="301fb163-845b-46c6-b99c-4a2dc35b3265" class="GINGER_SOFTWARE_mark">i</gs>)<gs id="7fb1a14f-4ad3-400f-b265-2e31d0df20ab" ginger_software_uiphraseguid="301fb163-845b-46c6-b99c-4a2dc35b3265" class="GINGER_SOFTWARE_mark">.</gs>Copy
<gs id="7f44caa7-8048-4b19-a597-dc4cab981739" ginger_software_uiphraseguid="a672e506-1ada-4d15-baec-2c65a7db999e" class="GINGER_SOFTWARE_mark">ws</gs><gs id="6f5a97ad-6fa6-4750-a8b4-1ef8a05cebad" ginger_software_uiphraseguid="a672e506-1ada-4d15-baec-2c65a7db999e" class="GINGER_SOFTWARE_mark">.</gs>Rows<gs id="2a0408ce-364e-4405-b61f-05c81f3b2544" ginger_software_uiphraseguid="a672e506-1ada-4d15-baec-2c65a7db999e" class="GINGER_SOFTWARE_mark">(</gs><gs id="b2e74fc1-043e-4ff6-92f7-c23b4265009a" ginger_software_uiphraseguid="a672e506-1ada-4d15-baec-2c65a7db999e" class="GINGER_SOFTWARE_mark">wsRow</gs> & ":" & <gs id="fe01a09a-4374-4f7d-ae72-f2919a5108e2" ginger_software_uiphraseguid="a672e506-1ada-4d15-baec-2c65a7db999e" class="GINGER_SOFTWARE_mark">wsRow</gs>)<gs id="0f52a33a-c843-4772-a095-7cc5e94b9135" ginger_software_uiphraseguid="a672e506-1ada-4d15-baec-2c65a7db999e" class="GINGER_SOFTWARE_mark">.</gs>PasteSpecial _
Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
Application<gs id="052fd877-7efa-4784-9ce9-544d51338357" ginger_software_uiphraseguid="5222341e-0896-4f41-8cf5-dff57eb08f43" class="GINGER_SOFTWARE_mark">.</gs>CutCopyMode = False
End Sub
Private Sub Reset<gs id="84f29b22-c957-49f4-a9fb-f22c05be7f03" ginger_software_uiphraseguid="24934634-ed30-4338-86f1-6d808dc08d08" class="GINGER_SOFTWARE_mark">(</gs>ByRef x As Boolean)
<gs id="4a9895e0-ebf4-4281-a308-c23fc0d34fb9" ginger_software_uiphraseguid="4335905d-4672-4671-b605-0550f3ec7b90" class="GINGER_SOFTWARE_mark">x</gs> = False
End Sub
Private Sub InsertSheet<gs id="c5ecee02-4f18-4d65-a2e2-e9b3f49311c9" ginger_software_uiphraseguid="3711a649-5764-4ddc-adaa-b9ced4b815d5" class="GINGER_SOFTWARE_mark">(</gs><gs id="db1d4f2b-8bfb-4e01-aaf1-34880fa0e4f9" ginger_software_uiphraseguid="3711a649-5764-4ddc-adaa-b9ced4b815d5" class="GINGER_SOFTWARE_mark">shName</gs> As String, ByRef sh As Worksheet, ByRef ws As Worksheet, DDNameColumn As String)
Dim <gs id="96f51786-58ac-47a6-bf99-cd78060a5166" ginger_software_uiphraseguid="680a4af4-709f-4d7b-a419-276d2b82f296" class="GINGER_SOFTWARE_mark">wsRow</gs> As Long
Worksheets<gs id="b16e97dd-52b5-4af8-b0b5-8dd885a97cce" ginger_software_uiphraseguid="8026002d-f9c2-49b0-a824-17afbc72faef" class="GINGER_SOFTWARE_mark">.</gs>Add<gs id="eb4a366a-5b7b-403d-b6cf-c2d3233cbeeb" ginger_software_uiphraseguid="8026002d-f9c2-49b0-a824-17afbc72faef" class="GINGER_SOFTWARE_mark">(</gs>After<gs id="9f8fde89-31c4-45c6-a879-722ee0d28a9f" ginger_software_uiphraseguid="8026002d-f9c2-49b0-a824-17afbc72faef" class="GINGER_SOFTWARE_mark">:</gs>=Worksheets<gs id="8a824cd9-a897-4e95-836c-235173e0193c" ginger_software_uiphraseguid="8026002d-f9c2-49b0-a824-17afbc72faef" class="GINGER_SOFTWARE_mark">(</gs>Worksheets<gs id="c4a32479-42f0-42cc-b58b-db1d59c99a7c" ginger_software_uiphraseguid="8026002d-f9c2-49b0-a824-17afbc72faef" class="GINGER_SOFTWARE_mark">.</gs>Count))<gs id="8b6ff402-e5d8-425b-8864-5650ac8576df" ginger_software_uiphraseguid="8026002d-f9c2-49b0-a824-17afbc72faef" class="GINGER_SOFTWARE_mark">.</gs>Name = <gs id="c57dc6d9-e8c7-4a61-ab88-587fa5ccaeb7" ginger_software_uiphraseguid="8026002d-f9c2-49b0-a824-17afbc72faef" class="GINGER_SOFTWARE_mark">shName</gs>
With ActiveSheet<gs id="3648da31-87e5-4116-8c59-afa653782f5f" ginger_software_uiphraseguid="fad1caa8-cd4c-4209-aeb5-e6c44b8b1dd3" class="GINGER_SOFTWARE_mark">.</gs>PageSetup
<gs id="0e29080b-417c-43be-8a60-dec848154151" ginger_software_uiphraseguid="2b6709cc-285d-4274-83d9-97440aa65a11" class="GINGER_SOFTWARE_mark">.</gs><gs id="bab2f2d0-be7f-48b6-a91f-1776094e6bd9" ginger_software_uiphraseguid="2b6709cc-285d-4274-83d9-97440aa65a11" class="GINGER_SOFTWARE_mark">CenterHeader</gs> = "<gs id="2a05c31c-667f-415e-854d-957a0264245c" ginger_software_uiphraseguid="2b6709cc-285d-4274-83d9-97440aa65a11" class="GINGER_SOFTWARE_mark">CompanyA</gs> " & <gs id="5ef92992-d6fc-471c-891c-47943512cdae" ginger_software_uiphraseguid="2b6709cc-285d-4274-83d9-97440aa65a11" class="GINGER_SOFTWARE_mark">shName</gs> & Chr<gs id="d9917a67-f35d-4462-912f-5a75e28afe29" ginger_software_uiphraseguid="2b6709cc-285d-4274-83d9-97440aa65a11" class="GINGER_SOFTWARE_mark">(</gs>10) & "As of FY " & <gs id="b7f6cdc4-1ebd-43f8-9b8d-3744a1b28159" ginger_software_uiphraseguid="2b6709cc-285d-4274-83d9-97440aa65a11" class="GINGER_SOFTWARE_mark">uPeriod</gs>
<gs id="f187dd37-8c6d-4ab2-833d-47eed4bc74a3" ginger_software_uiphraseguid="bc9660b1-c913-49df-b9d8-910dafb298dc" class="GINGER_SOFTWARE_mark">.</gs><gs id="d69398ea-6549-4e1e-9521-8574dbf0d7ee" ginger_software_uiphraseguid="bc9660b1-c913-49df-b9d8-910dafb298dc" class="GINGER_SOFTWARE_mark">CenterFooter</gs> = "Page &P of &N"
<gs id="0251c125-0f58-449a-b62a-8df942e43372" ginger_software_uiphraseguid="b7077b95-6551-404d-885e-20a80fccce46" class="GINGER_SOFTWARE_mark">.</gs>Orientation = <gs id="b764b829-9f4e-4297-b8e0-b2a0537446af" ginger_software_uiphraseguid="b7077b95-6551-404d-885e-20a80fccce46" class="GINGER_SOFTWARE_mark">xlLandscape</gs> ' or <gs id="8914b78f-f100-482d-acac-b9a0fc23bad8" ginger_software_uiphraseguid="b7077b95-6551-404d-885e-20a80fccce46" class="GINGER_SOFTWARE_mark">xlPortrait</gs>
<gs id="d19268d8-c6d5-4a9a-8606-6f5d3e198087" ginger_software_uiphraseguid="fe2c9ab5-2aaa-489a-b639-10df47e15af9" class="GINGER_SOFTWARE_mark">.</gs><gs id="909ff630-a136-435f-a15b-fad0d9c72c6b" ginger_software_uiphraseguid="fe2c9ab5-2aaa-489a-b639-10df47e15af9" class="GINGER_SOFTWARE_mark">PaperSize</gs> = <gs id="f563e328-eb88-4335-8781-5513a2754f4b" ginger_software_uiphraseguid="fe2c9ab5-2aaa-489a-b639-10df47e15af9" class="GINGER_SOFTWARE_mark">xlPaperLegal</gs>
End With
<gs id="649e72f2-0329-4a4e-b21c-84cfcc1b3e9e" ginger_software_uiphraseguid="e6f4c9f9-c19a-44b1-9be5-c445cf8a25b7" class="GINGER_SOFTWARE_mark">sh</gs><gs id="b23bc7ae-9adc-4d9a-9656-ad13f19aa79a" ginger_software_uiphraseguid="e6f4c9f9-c19a-44b1-9be5-c445cf8a25b7" class="GINGER_SOFTWARE_mark">.</gs>Rows<gs id="44214b0e-c9e2-4448-a0bb-5608da79e0af" ginger_software_uiphraseguid="e6f4c9f9-c19a-44b1-9be5-c445cf8a25b7" class="GINGER_SOFTWARE_mark">(</gs>"1:1")<gs id="3ba3dc83-44cf-485c-965e-993c4a7a5e29" ginger_software_uiphraseguid="e6f4c9f9-c19a-44b1-9be5-c445cf8a25b7" class="GINGER_SOFTWARE_mark">.</gs>Copy
Set <gs id="cf710ede-ad31-4719-89f6-4fe06bd130ae" ginger_software_uiphraseguid="6fdaf474-2a23-4c6d-b9ac-3a93bfb85348" class="GINGER_SOFTWARE_mark">ws</gs> = Sheets<gs id="252fbd64-7bdc-4fc7-8500-c8d836996ad0" ginger_software_uiphraseguid="6fdaf474-2a23-4c6d-b9ac-3a93bfb85348" class="GINGER_SOFTWARE_mark">(</gs>Worksheets<gs id="0faf17bf-4d3a-4623-a041-32632a2abd84" ginger_software_uiphraseguid="6fdaf474-2a23-4c6d-b9ac-3a93bfb85348" class="GINGER_SOFTWARE_mark">.</gs>Count)
<gs id="ea7afcad-5d51-4086-9d49-0da74dc771df" ginger_software_uiphraseguid="6ee2833d-b1e0-4a19-b9fa-b19ffcadaaeb" class="GINGER_SOFTWARE_mark">ws</gs><gs id="23294e52-bcaa-4a73-b146-d00d212e51ed" ginger_software_uiphraseguid="6ee2833d-b1e0-4a19-b9fa-b19ffcadaaeb" class="GINGER_SOFTWARE_mark">.</gs>Rows<gs id="a53ba2b4-f5b6-4c36-9b92-34473379c35d" ginger_software_uiphraseguid="6ee2833d-b1e0-4a19-b9fa-b19ffcadaaeb" class="GINGER_SOFTWARE_mark">(</gs>"1:1")<gs id="6e542758-d3ae-497c-94d4-87bf4cc1252f" ginger_software_uiphraseguid="6ee2833d-b1e0-4a19-b9fa-b19ffcadaaeb" class="GINGER_SOFTWARE_mark">.</gs>PasteSpecial _
Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
Application<gs id="c254354f-0eda-458d-8c45-8c4b84decf9c" ginger_software_uiphraseguid="ede551ba-9132-425f-a9cb-c25fc94095bd" class="GINGER_SOFTWARE_mark">.</gs>CutCopyMode = False
End Sub
Private Sub ModifyHDR<gs id="dbc2bec7-823e-4cd8-b697-742dde8af596" ginger_software_uiphraseguid="77e4bc6a-c125-48f1-8892-237e3cd3fc1a" class="GINGER_SOFTWARE_mark">(</gs><gs id="a8875995-d0f4-402f-b9cc-0a1af00913fe" ginger_software_uiphraseguid="77e4bc6a-c125-48f1-8892-237e3cd3fc1a" class="GINGER_SOFTWARE_mark">shName</gs> As String, ByRef sh As Worksheet, ByRef ws As Worksheet, DDNameColumn As String)
Range<gs id="6c3db8ce-7652-4ab0-9eaf-8d26aac36ccb" ginger_software_uiphraseguid="2a257882-641b-47c5-849f-94b2d772a129" class="GINGER_SOFTWARE_mark">(</gs>"A1<gs id="8d45c13c-f99f-4dc8-aaa9-0eb72a40c2db" ginger_software_uiphraseguid="2a257882-641b-47c5-849f-94b2d772a129" class="GINGER_SOFTWARE_mark">:</gs>M1")<gs id="e0ddfc74-8338-47ba-b7a7-482b656e58c2" ginger_software_uiphraseguid="2a257882-641b-47c5-849f-94b2d772a129" class="GINGER_SOFTWARE_mark">.</gs>Select
Selection<gs id="4fdb5a44-f50d-4887-a24b-2e5814ee7f6d" ginger_software_uiphraseguid="9a5e416d-80aa-4144-b2ca-a71405f3d84c" class="GINGER_SOFTWARE_mark">.</gs>Font<gs id="43ac19b0-d034-46e4-a59c-cc60cbcba0ec" ginger_software_uiphraseguid="9a5e416d-80aa-4144-b2ca-a71405f3d84c" class="GINGER_SOFTWARE_mark">.</gs>Bold = True
With Selection<gs id="c761d0f4-647e-4429-9125-52a39881115f" ginger_software_uiphraseguid="f84dfd01-00b7-43d6-aded-466c89c4c29a" class="GINGER_SOFTWARE_mark">.</gs>Interior
<gs id="2805f538-1cc4-44b6-b8ea-e34a31741289" ginger_software_uiphraseguid="eb745a94-2b69-4d22-bbc7-eb425b959d57" class="GINGER_SOFTWARE_mark">.</gs>Pattern = <gs id="770c7664-ec55-4326-a60c-a8d0a5c04e9f" ginger_software_uiphraseguid="eb745a94-2b69-4d22-bbc7-eb425b959d57" class="GINGER_SOFTWARE_mark">xlSolid</gs>
<gs id="721379d1-51c2-4dc7-b2af-eb9e8235975c" ginger_software_uiphraseguid="a431743b-897a-4228-8458-655b6198eb0b" class="GINGER_SOFTWARE_mark">.</gs><gs id="c6d53061-4c64-4eeb-b619-bbaa90f53c47" ginger_software_uiphraseguid="a431743b-897a-4228-8458-655b6198eb0b" class="GINGER_SOFTWARE_mark">PatternColorIndex</gs> = <gs id="1514e95d-f889-4376-bf8c-79e0ebe84070" ginger_software_uiphraseguid="a431743b-897a-4228-8458-655b6198eb0b" class="GINGER_SOFTWARE_mark">xlAutomatic</gs>
<gs id="343a9b11-7b1b-4337-bdc9-2f03abbec01a" ginger_software_uiphraseguid="327cf033-3184-460c-8c65-59651fb4af79" class="GINGER_SOFTWARE_mark">.</gs><gs id="f57b6816-018d-4ed5-a789-d38cfffd2466" ginger_software_uiphraseguid="327cf033-3184-460c-8c65-59651fb4af79" class="GINGER_SOFTWARE_mark">ThemeColor</gs> = xlThemeColorLight2
<gs id="d0da7c11-6470-45e3-a7a6-6977ba27dfe1" ginger_software_uiphraseguid="c1686971-9ebf-45e5-ae20-2ce060b3f12d" class="GINGER_SOFTWARE_mark">.</gs><gs id="8dfcdc87-f034-4a24-8749-1a67b0a9d684" ginger_software_uiphraseguid="c1686971-9ebf-45e5-ae20-2ce060b3f12d" class="GINGER_SOFTWARE_mark">TintAndShade</gs> = 0.799981688894314
<gs id="7d4431bf-f9ce-4eaf-b079-a1583d3a5cc0" ginger_software_uiphraseguid="11565cf4-9012-4957-87bf-d36a72c9f7cc" class="GINGER_SOFTWARE_mark">.</gs><gs id="33a86bf7-227a-4eed-876e-37de87052739" ginger_software_uiphraseguid="11565cf4-9012-4957-87bf-d36a72c9f7cc" class="GINGER_SOFTWARE_mark">PatternTintAndShade</gs> = 0
End With
End Sub
Sub PeriodInputBox<gs id="1fb61c3e-7151-46de-bfbf-8bd7e807ec04" ginger_software_uiphraseguid="c12fcab2-5f03-40cf-8c56-c19cbd069d71" class="GINGER_SOFTWARE_mark">(</gs><gs id="72870a3f-0053-4480-8eef-25dbda44ed32" ginger_software_uiphraseguid="c12fcab2-5f03-40cf-8c56-c19cbd069d71" class="GINGER_SOFTWARE_mark">uPeriod</gs> As String)
<gs id="cc91f3f2-7559-45d9-890d-89e7214bf232" ginger_software_uiphraseguid="b90af1fb-fb24-44ed-868d-72809174472f" class="GINGER_SOFTWARE_mark">uPeriod</gs> = InputBox<gs id="ddaa4031-cf11-4728-92ba-a75febff3530" ginger_software_uiphraseguid="b90af1fb-fb24-44ed-868d-72809174472f" class="GINGER_SOFTWARE_mark">(</gs>"Please enter the period for this report (YYYY P##)")
End Sub<gs id="f246d9b6-50ad-4cec-b2b0-5ab076ca0f47" ginger_software_uiphraseguid="fd7dd6e0-be37-48ed-8076-dbaf8282c943" class="GINGER_SOFTWARE_mark">[</gs>/CODE]
I'm getting the following run-time error '1004'
Cannot rename a sheet <gs id="f13c8667-210e-4a18-a120-d2fd4a3acc15" ginger_software_uiphraseguid="8adb6e94-5835-4515-bfcd-dc2df1097813" class="GINGER_SOFTWARE_mark">to</gs> the same name as another sheet, a referenced object library or workbook referenced by Visual Basic
When I step through the code it shows the Sheet1 name instead of Sheet2. So it is on the third loop.
P.S. The code below works as a module of the "Data" worksheet/workbook. Only fails when I make it <gs id="21885f83-f815-4dd0-a43b-e754f89b2038" ginger_software_uiphraseguid="f4cca5c6-88f7-4a70-951f-98a14914b60d" class="GINGER_SOFTWARE_mark">an</gs> <gs id="0c7d4a05-4223-4cd8-95cf-61611e739a73" ginger_software_uiphraseguid="f4cca5c6-88f7-4a70-951f-98a14914b60d" class="GINGER_SOFTWARE_mark">addin</gs>.
[CODE<gs id="260959ef-112c-4be3-a4ea-70fe2fecdc2e" ginger_software_uiphraseguid="2052f4a4-c8d1-4127-b4cc-c0b696951873" class="GINGER_SOFTWARE_mark">]</gs>Private Sub InsertSheet<gs id="9dec52d1-66b1-4286-8240-430780c12f09" ginger_software_uiphraseguid="2052f4a4-c8d1-4127-b4cc-c0b696951873" class="GINGER_SOFTWARE_mark">(</gs><gs id="15df80cc-0f13-4074-ac88-d8770d932b71" ginger_software_uiphraseguid="2052f4a4-c8d1-4127-b4cc-c0b696951873" class="GINGER_SOFTWARE_mark">shName</gs> As String, ByRef sh As Worksheet, ByRef ws As Worksheet, DDNameColumn As String) Dim <gs id="454e8654-f620-43c2-9469-9bcd30d29285" ginger_software_uiphraseguid="2052f4a4-c8d1-4127-b4cc-c0b696951873" class="GINGER_SOFTWARE_mark">wsRow</gs> As Long
Worksheets<gs id="81b6c186-f971-401f-b00b-468f414ea113" ginger_software_uiphraseguid="c68827cb-c639-42df-8156-c3a51eca1a3b" class="GINGER_SOFTWARE_mark">.</gs>Add<gs id="59a9187a-ae6e-4b9f-9be6-f1d2cccd2676" ginger_software_uiphraseguid="c68827cb-c639-42df-8156-c3a51eca1a3b" class="GINGER_SOFTWARE_mark">(</gs>After<gs id="fb36351a-80cd-4e9b-9cd0-da4cab1aa265" ginger_software_uiphraseguid="c68827cb-c639-42df-8156-c3a51eca1a3b" class="GINGER_SOFTWARE_mark">:</gs>=Worksheets<gs id="feb7b660-9e0d-4bb8-a056-05b6dd316813" ginger_software_uiphraseguid="c68827cb-c639-42df-8156-c3a51eca1a3b" class="GINGER_SOFTWARE_mark">(</gs>Worksheets<gs id="71214d1b-9447-4f94-afdf-9f608ddf31d2" ginger_software_uiphraseguid="c68827cb-c639-42df-8156-c3a51eca1a3b" class="GINGER_SOFTWARE_mark">.</gs>Count))<gs id="04b63bb6-5089-4929-9633-64f0fc3bb88e" ginger_software_uiphraseguid="c68827cb-c639-42df-8156-c3a51eca1a3b" class="GINGER_SOFTWARE_mark">.</gs>Name = <gs id="0487491e-03ef-4c7b-89c3-5ac0b97f7c02" ginger_software_uiphraseguid="c68827cb-c639-42df-8156-c3a51eca1a3b" class="GINGER_SOFTWARE_mark">shName</gs>
With ActiveSheet<gs id="9dbbcf96-c9bc-4beb-ba37-af371d22aba7" ginger_software_uiphraseguid="38b80811-fb4f-42f5-80d3-e1900dc92461" class="GINGER_SOFTWARE_mark">.</gs>PageSetup
<gs id="654d6384-f36b-4fcb-9c9e-b01eb104ef01" ginger_software_uiphraseguid="b1555d7d-4eb4-4e46-93df-2c55f06b12c5" class="GINGER_SOFTWARE_mark">.</gs><gs id="51025e55-f7fc-4fbc-b40c-c0d441c9f738" ginger_software_uiphraseguid="b1555d7d-4eb4-4e46-93df-2c55f06b12c5" class="GINGER_SOFTWARE_mark">CenterHeader</gs> = "<gs id="3794b5a1-d1b2-4e00-9249-60e49ff7d5bf" ginger_software_uiphraseguid="b1555d7d-4eb4-4e46-93df-2c55f06b12c5" class="GINGER_SOFTWARE_mark">CompanyA</gs> " & <gs id="8582f0fc-62f4-44ec-8c95-8475d27b20c1" ginger_software_uiphraseguid="b1555d7d-4eb4-4e46-93df-2c55f06b12c5" class="GINGER_SOFTWARE_mark">shName</gs> & Chr<gs id="adfc4bee-b228-4c9b-8352-19fd1ffa7685" ginger_software_uiphraseguid="b1555d7d-4eb4-4e46-93df-2c55f06b12c5" class="GINGER_SOFTWARE_mark">(</gs>10) & "As of FY " & <gs id="49e1ef04-adab-45ab-9747-97bb49396a35" ginger_software_uiphraseguid="b1555d7d-4eb4-4e46-93df-2c55f06b12c5" class="GINGER_SOFTWARE_mark">uPeriod</gs>
<gs id="34566719-c234-4119-8ca6-a77ecba88a61" ginger_software_uiphraseguid="59491245-0de5-4e87-8367-c61b3d141fc6" class="GINGER_SOFTWARE_mark">.</gs><gs id="5d6f810b-d7e5-473d-b380-2efc2f4331f0" ginger_software_uiphraseguid="59491245-0de5-4e87-8367-c61b3d141fc6" class="GINGER_SOFTWARE_mark">CenterFooter</gs> = "Page &P of &N"
<gs id="65547007-3ecb-42cc-aac9-edbaedd0aba0" ginger_software_uiphraseguid="398c9a85-f55a-4f72-9cf3-e5e1d1fdf78a" class="GINGER_SOFTWARE_mark">.</gs>Orientation = <gs id="7724ac7c-a0da-47fe-90c8-7cc480633254" ginger_software_uiphraseguid="398c9a85-f55a-4f72-9cf3-e5e1d1fdf78a" class="GINGER_SOFTWARE_mark">xlLandscape</gs> ' or <gs id="28ac980d-06b8-49e6-bae8-f87af4f22f64" ginger_software_uiphraseguid="398c9a85-f55a-4f72-9cf3-e5e1d1fdf78a" class="GINGER_SOFTWARE_mark">xlPortrait</gs>
<gs id="85e2e0d7-1e01-4d05-b4bc-165aa34a48d8" ginger_software_uiphraseguid="8dd19fd2-1f77-419e-a5a4-77c8b67b4a81" class="GINGER_SOFTWARE_mark">.</gs><gs id="655d8c0e-1cfd-4422-93b0-ca09dc252a3f" ginger_software_uiphraseguid="8dd19fd2-1f77-419e-a5a4-77c8b67b4a81" class="GINGER_SOFTWARE_mark">PaperSize</gs> = <gs id="4af30296-d437-4c5e-ae7c-a4d50ec77b55" ginger_software_uiphraseguid="8dd19fd2-1f77-419e-a5a4-77c8b67b4a81" class="GINGER_SOFTWARE_mark">xlPaperLegal</gs>
End With
<gs id="a6df46cf-048d-404a-9425-de99e558b2ae" ginger_software_uiphraseguid="65334c28-2649-4d5e-98ce-550c4c805e75" class="GINGER_SOFTWARE_mark">sh</gs><gs id="bc27cfcb-ed06-49de-b0ae-03e77eef4c31" ginger_software_uiphraseguid="65334c28-2649-4d5e-98ce-550c4c805e75" class="GINGER_SOFTWARE_mark">.</gs>Rows<gs id="746e11c1-c987-4f0c-8cd6-0bad19b724c0" ginger_software_uiphraseguid="65334c28-2649-4d5e-98ce-550c4c805e75" class="GINGER_SOFTWARE_mark">(</gs>"1:1")<gs id="610ecdd0-ddfa-493e-ba0b-5fc667528d31" ginger_software_uiphraseguid="65334c28-2649-4d5e-98ce-550c4c805e75" class="GINGER_SOFTWARE_mark">.</gs>Copy
Set <gs id="de0eeec0-2f0e-4fd7-beac-83c116aee002" ginger_software_uiphraseguid="d7f85aad-1f90-4213-89c1-4709cd4a38a2" class="GINGER_SOFTWARE_mark">ws</gs> = Sheets<gs id="a31b7af4-1e90-4ae1-94f8-24923ba3cc73" ginger_software_uiphraseguid="d7f85aad-1f90-4213-89c1-4709cd4a38a2" class="GINGER_SOFTWARE_mark">(</gs>Worksheets<gs id="66f586b3-aebb-4312-8c10-450a17559369" ginger_software_uiphraseguid="d7f85aad-1f90-4213-89c1-4709cd4a38a2" class="GINGER_SOFTWARE_mark">.</gs>Count)
<gs id="8fff72cb-d470-4ba8-816a-e6bfbc2b3588" ginger_software_uiphraseguid="02343074-5285-42ea-a902-bbca508b69bf" class="GINGER_SOFTWARE_mark">ws</gs><gs id="6a9e6f3c-5157-40fb-8c3a-40905cc36410" ginger_software_uiphraseguid="02343074-5285-42ea-a902-bbca508b69bf" class="GINGER_SOFTWARE_mark">.</gs>Rows<gs id="a1a925a5-812e-4dd2-9b44-3505520717e6" ginger_software_uiphraseguid="02343074-5285-42ea-a902-bbca508b69bf" class="GINGER_SOFTWARE_mark">(</gs>"1:1")<gs id="e3803e1b-475f-4a18-ab2d-aa06224fe631" ginger_software_uiphraseguid="02343074-5285-42ea-a902-bbca508b69bf" class="GINGER_SOFTWARE_mark">.</gs>PasteSpecial _
Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
Application<gs id="3676b8f5-b39c-454c-9627-b4f71f60b4d0" ginger_software_uiphraseguid="861b7725-e654-4be0-9b39-1cc22261740b" class="GINGER_SOFTWARE_mark">.</gs>CutCopyMode = False
End Sub<gs id="452bb3f6-0e13-4b45-853f-b33f2621457f" ginger_software_uiphraseguid="cd65760f-df9a-4aa2-b3e0-fa2c53bc6003" class="GINGER_SOFTWARE_mark">[</gs>/CODE]
Entire Module
[CODE<gs id="a38fd02b-9e3b-477c-81b9-92f822231809" ginger_software_uiphraseguid="3ea09bdd-2dff-431b-b7cc-9a0b1f7431bd" class="GINGER_SOFTWARE_mark">]</gs>Option <gs id="e7828031-a254-4080-adeb-07ff939a43f6" ginger_software_uiphraseguid="3ea09bdd-2dff-431b-b7cc-9a0b1f7431bd" class="GINGER_SOFTWARE_mark">ExplicitPublic</gs> <gs id="b59f0461-1543-4d32-b943-d167e7f2b034" ginger_software_uiphraseguid="3ea09bdd-2dff-431b-b7cc-9a0b1f7431bd" class="GINGER_SOFTWARE_mark">uPeriod</gs> As String
Sub PullDD<gs id="9b7f106a-fa4f-4f1a-ad74-2b862b551a12" ginger_software_uiphraseguid="456530b2-c71b-40e6-a89c-6c9fa81d6501" class="GINGER_SOFTWARE_mark">(</gs>)
Application<gs id="722d7800-dc0a-440b-a0ec-a25483c73305" ginger_software_uiphraseguid="3606a3d9-c2bd-43ea-ad74-76593b2a063e" class="GINGER_SOFTWARE_mark">.</gs>ScreenUpdating = False
Dim <gs id="1b2d35bf-7d84-4376-af97-7223a29bdcfe" ginger_software_uiphraseguid="b4829f05-7c1c-4f0d-a80b-39da49f46f23" class="GINGER_SOFTWARE_mark">shtName</gs> As String
Dim DDNameColumn As String
Dim <gs id="80dedbc1-ca26-449f-81d5-13c0dbb5633b" ginger_software_uiphraseguid="925d63c0-47a3-480d-a19c-705849171541" class="GINGER_SOFTWARE_mark">i</gs> As Long
Dim <gs id="36a9f364-cfbf-4bdb-8c3f-6cc97bf061c5" ginger_software_uiphraseguid="008c3857-3b0e-4526-8116-132a3e9d33c6" class="GINGER_SOFTWARE_mark">stRow</gs> As Long
Dim DD As String
Dim ws As Worksheet
Dim <gs id="8e808217-c0e3-4399-9df0-1a93bdcc06c9" ginger_software_uiphraseguid="f44367fe-1fee-4608-8aa4-87fbae8f6d38" class="GINGER_SOFTWARE_mark">sheetExist</gs> As Boolean
Dim sh As Worksheet
<gs id="86e7ce2d-165b-4dfc-8adf-44c37ca0f182" ginger_software_uiphraseguid="34d210bd-499f-4098-886b-833ac1e58aa1" class="GINGER_SOFTWARE_mark">shtName</gs> = "Data"
<gs id="99a05e67-cd81-4d63-a632-15200991b720" ginger_software_uiphraseguid="b445f916-1179-4633-ba83-afd8fd15a6e9" class="GINGER_SOFTWARE_mark">DDNameColumn</gs> = "D"
<gs id="faf328af-0e8d-4e1f-9360-479eaad0b3cf" ginger_software_uiphraseguid="b33e2511-b4c5-44f1-a2c7-5a55479adedd" class="GINGER_SOFTWARE_mark">stRow</gs> = 2
<gs id="c927926c-5a4b-43a9-95d0-158ac9bda7f9" ginger_software_uiphraseguid="a931f182-4338-42e6-a009-23514955b48b" class="GINGER_SOFTWARE_mark">PeriodInputBox</gs> <gs id="1e89c802-a4d7-41f5-845a-da3f70214d12" ginger_software_uiphraseguid="a931f182-4338-42e6-a009-23514955b48b" class="GINGER_SOFTWARE_mark">uPeriod</gs>
Set sh = Sheets<gs id="9823382d-c111-40cb-98d1-af7f949c5fa6" ginger_software_uiphraseguid="e06dd40d-8270-4bfe-825a-f86b39530dff" class="GINGER_SOFTWARE_mark">(</gs><gs id="33c6d272-6f48-42d3-9916-542fc22d2b47" ginger_software_uiphraseguid="e06dd40d-8270-4bfe-825a-f86b39530dff" class="GINGER_SOFTWARE_mark">shtName</gs>)
For <gs id="3c159a60-7b22-4232-945d-1cd6968820d5" ginger_software_uiphraseguid="46c4a9a9-f193-46d9-bc7c-57774c286ddb" class="GINGER_SOFTWARE_mark">i</gs> = <gs id="980ded5f-7414-4bc8-9c70-218ac7449e89" ginger_software_uiphraseguid="46c4a9a9-f193-46d9-bc7c-57774c286ddb" class="GINGER_SOFTWARE_mark">stRow</gs> To sh<gs id="40d945e4-8b31-46c7-934f-f8c4f706e2c1" ginger_software_uiphraseguid="46c4a9a9-f193-46d9-bc7c-57774c286ddb" class="GINGER_SOFTWARE_mark">.</gs>Range<gs id="76e89c05-c23b-4136-a49b-7b686eed6baa" ginger_software_uiphraseguid="46c4a9a9-f193-46d9-bc7c-57774c286ddb" class="GINGER_SOFTWARE_mark">(</gs>DDNameColumn & Rows<gs id="33af92f8-944b-4093-a51d-610dff524fa1" ginger_software_uiphraseguid="46c4a9a9-f193-46d9-bc7c-57774c286ddb" class="GINGER_SOFTWARE_mark">.</gs>Count)<gs id="69e33d5e-40f2-4d78-9a12-acb8d1893734" ginger_software_uiphraseguid="46c4a9a9-f193-46d9-bc7c-57774c286ddb" class="GINGER_SOFTWARE_mark">.</gs>End<gs id="23519f26-2c52-4927-9144-0a2982d1d8fe" ginger_software_uiphraseguid="46c4a9a9-f193-46d9-bc7c-57774c286ddb" class="GINGER_SOFTWARE_mark">(</gs><gs id="ceeb8325-b086-44bb-ba7c-42c65243083e" ginger_software_uiphraseguid="46c4a9a9-f193-46d9-bc7c-57774c286ddb" class="GINGER_SOFTWARE_mark">xlUp</gs>)<gs id="52d92ee2-5347-4598-aef0-ef4f9f2db409" ginger_software_uiphraseguid="46c4a9a9-f193-46d9-bc7c-57774c286ddb" class="GINGER_SOFTWARE_mark">.</gs>Row
DD = sh<gs id="3c4f2f71-05f7-4cd6-ab84-537ef92db91c" ginger_software_uiphraseguid="4ca995cd-dbc8-4d60-94d1-068a1ea4a553" class="GINGER_SOFTWARE_mark">.</gs>Range<gs id="f520f260-caea-40c1-b6a4-fda202d45320" ginger_software_uiphraseguid="4ca995cd-dbc8-4d60-94d1-068a1ea4a553" class="GINGER_SOFTWARE_mark">(</gs>DDNameColumn & <gs id="82e24fa1-0b38-4f61-b777-6a3b0bc7a56e" ginger_software_uiphraseguid="4ca995cd-dbc8-4d60-94d1-068a1ea4a553" class="GINGER_SOFTWARE_mark">i</gs>)<gs id="aa9f9003-df65-4d77-a3e9-f7282cfedae1" ginger_software_uiphraseguid="4ca995cd-dbc8-4d60-94d1-068a1ea4a553" class="GINGER_SOFTWARE_mark">.</gs>Value
For Each ws In ThisWorkbook<gs id="1618d0bd-00a2-4306-88cf-36f0c2cf4d3d" ginger_software_uiphraseguid="f89de04c-676d-4a5d-af8a-6f6b78898d02" class="GINGER_SOFTWARE_mark">.</gs>Sheets
If StrComp<gs id="f2887ec1-e8f5-478c-a245-87d839680cb5" ginger_software_uiphraseguid="08e665c1-feb7-4476-af0b-ac309aae05c3" class="GINGER_SOFTWARE_mark">(</gs><gs id="a8378eff-ca18-46b0-86f9-07a58ca78504" ginger_software_uiphraseguid="08e665c1-feb7-4476-af0b-ac309aae05c3" class="GINGER_SOFTWARE_mark">ws</gs><gs id="2da88bdb-fc8f-4651-9998-c1bae1a3d262" ginger_software_uiphraseguid="08e665c1-feb7-4476-af0b-ac309aae05c3" class="GINGER_SOFTWARE_mark">.</gs>Name, DD, <gs id="c8bf8f5e-1ac3-47a3-b04a-71573e3f3e06" ginger_software_uiphraseguid="08e665c1-feb7-4476-af0b-ac309aae05c3" class="GINGER_SOFTWARE_mark">vbTextCompare</gs>) = 0 Then
<gs id="2e2d2aff-324d-4762-8542-9b7a89c7227d" ginger_software_uiphraseguid="2afc6648-6164-4af8-8393-eb1c0f9fe38c" class="GINGER_SOFTWARE_mark">sheetExist</gs> = True
Exit For
End If
Next
If <gs id="35f5a95e-90f1-4cbf-a030-ffa7f4186308" ginger_software_uiphraseguid="0c1cb1d4-383f-4cc7-bec0-39a14a89392c" class="GINGER_SOFTWARE_mark">sheetExist</gs> Then
<gs id="3f1c555c-ef2b-48de-860d-88679381ef2d" ginger_software_uiphraseguid="4dabf9d1-ba30-4f64-bb9b-1c94996e7bd2" class="GINGER_SOFTWARE_mark">CopyRow</gs> <gs id="15721b1b-74bb-4207-826f-b8815b029c69" ginger_software_uiphraseguid="4dabf9d1-ba30-4f64-bb9b-1c94996e7bd2" class="GINGER_SOFTWARE_mark">i</gs>, sh, <gs id="73801af2-5c41-40de-9ee6-fbedd1f5f93d" ginger_software_uiphraseguid="4dabf9d1-ba30-4f64-bb9b-1c94996e7bd2" class="GINGER_SOFTWARE_mark">ws</gs>, DDNameColumn
Else
InsertSheet DD, sh, ws, DDNameColumn
Set <gs id="4a831a3d-e0a3-4763-929e-5332b9f3f746" ginger_software_uiphraseguid="07873a95-6a66-4ac1-8611-d9673320e319" class="GINGER_SOFTWARE_mark">ws</gs> = Sheets<gs id="692512d1-d169-49b4-8ca2-eb0a4234c972" ginger_software_uiphraseguid="07873a95-6a66-4ac1-8611-d9673320e319" class="GINGER_SOFTWARE_mark">(</gs>Worksheets<gs id="75cfe5b0-9d0b-4a2a-ae4a-096490e8c1a3" ginger_software_uiphraseguid="07873a95-6a66-4ac1-8611-d9673320e319" class="GINGER_SOFTWARE_mark">.</gs>Count)
<gs id="3ace72db-1389-46e3-b7db-48922ea9db22" ginger_software_uiphraseguid="d7703ca4-17c1-4bef-878f-a5cd372ff19d" class="GINGER_SOFTWARE_mark">CopyRow</gs> <gs id="8c574071-7d9c-4053-8d00-42d46d5d74d1" ginger_software_uiphraseguid="d7703ca4-17c1-4bef-878f-a5cd372ff19d" class="GINGER_SOFTWARE_mark">i</gs>, sh, <gs id="143b23cb-2dde-4008-b6b3-f7f4c28caf52" ginger_software_uiphraseguid="d7703ca4-17c1-4bef-878f-a5cd372ff19d" class="GINGER_SOFTWARE_mark">ws</gs>, DDNameColumn
ModifyHDR DD, sh, ws, DDNameColumn
End If
Reset <gs id="da583cd5-4909-466b-baa4-f21acd24cd58" ginger_software_uiphraseguid="2c127e6d-e969-496e-bc36-e79226d2e569" class="GINGER_SOFTWARE_mark">sheetExist</gs>
Next <gs id="8020849a-a107-4191-9d20-817e4e908588" ginger_software_uiphraseguid="59e7a1f1-44f3-49ce-823f-725f017f6b22" class="GINGER_SOFTWARE_mark">i</gs>
End Sub
Private Sub CopyRow<gs id="4a4d136f-7ebb-4f44-adbd-b253b45414ca" ginger_software_uiphraseguid="2d0b4956-0d56-4e97-8cdb-2f9b7e195571" class="GINGER_SOFTWARE_mark">(</gs><gs id="b433cabc-32ff-43f3-9f85-8ce14e566a8a" ginger_software_uiphraseguid="2d0b4956-0d56-4e97-8cdb-2f9b7e195571" class="GINGER_SOFTWARE_mark">i</gs> As Long, ByRef sh As Worksheet, ByRef ws As Worksheet, DDNameColumn As String)
Dim <gs id="b33605e3-2805-4b97-9bf0-1083286685bb" ginger_software_uiphraseguid="a892ff2b-0dad-451d-b132-5d7bbd2f74e1" class="GINGER_SOFTWARE_mark">wsRow</gs> As Long
<gs id="760f9a84-71f0-4d03-86ef-b6a91bc376db" ginger_software_uiphraseguid="b0ec8638-781c-46cd-a6c3-df824201b8d1" class="GINGER_SOFTWARE_mark">wsRow</gs> = <gs id="8cffed8f-9dec-476e-a47c-6f673f45c9dd" ginger_software_uiphraseguid="b0ec8638-781c-46cd-a6c3-df824201b8d1" class="GINGER_SOFTWARE_mark">ws</gs><gs id="43660bc7-2872-40fc-a9fb-8d0346345ab5" ginger_software_uiphraseguid="b0ec8638-781c-46cd-a6c3-df824201b8d1" class="GINGER_SOFTWARE_mark">.</gs>Range<gs id="1283aa67-81e5-4c1a-9c26-449b13bd9754" ginger_software_uiphraseguid="b0ec8638-781c-46cd-a6c3-df824201b8d1" class="GINGER_SOFTWARE_mark">(</gs>DDNameColumn & Rows<gs id="c46ff2a1-5a72-41a4-a866-0cfcd0035903" ginger_software_uiphraseguid="b0ec8638-781c-46cd-a6c3-df824201b8d1" class="GINGER_SOFTWARE_mark">.</gs>Count)<gs id="f8562061-830a-4a63-9818-7a97d4ae340d" ginger_software_uiphraseguid="b0ec8638-781c-46cd-a6c3-df824201b8d1" class="GINGER_SOFTWARE_mark">.</gs>End<gs id="5ad1d890-d1de-438e-b9d9-f9e31e2feb31" ginger_software_uiphraseguid="b0ec8638-781c-46cd-a6c3-df824201b8d1" class="GINGER_SOFTWARE_mark">(</gs><gs id="316b5d45-e2b7-4b34-a5af-5a3f9cce04d0" ginger_software_uiphraseguid="b0ec8638-781c-46cd-a6c3-df824201b8d1" class="GINGER_SOFTWARE_mark">xlUp</gs>)<gs id="b2bff7eb-3861-4786-9a67-22ff1a6b5e55" ginger_software_uiphraseguid="b0ec8638-781c-46cd-a6c3-df824201b8d1" class="GINGER_SOFTWARE_mark">.</gs>Row + 1
<gs id="8645940b-3d16-46d5-a4e9-e50f86993f0b" ginger_software_uiphraseguid="301fb163-845b-46c6-b99c-4a2dc35b3265" class="GINGER_SOFTWARE_mark">sh</gs><gs id="3ec2b641-7a46-4c8b-b905-0a651dbb4b13" ginger_software_uiphraseguid="301fb163-845b-46c6-b99c-4a2dc35b3265" class="GINGER_SOFTWARE_mark">.</gs>Rows<gs id="451bbf97-4bc6-4b29-967d-a276208058ca" ginger_software_uiphraseguid="301fb163-845b-46c6-b99c-4a2dc35b3265" class="GINGER_SOFTWARE_mark">(</gs><gs id="5b3d4f90-1ae2-4faf-8ecc-5aa940ca0d36" ginger_software_uiphraseguid="301fb163-845b-46c6-b99c-4a2dc35b3265" class="GINGER_SOFTWARE_mark">i</gs> & ":" & <gs id="ce7a9c16-3276-41be-b6dd-192cfa5f05fb" ginger_software_uiphraseguid="301fb163-845b-46c6-b99c-4a2dc35b3265" class="GINGER_SOFTWARE_mark">i</gs>)<gs id="7fb1a14f-4ad3-400f-b265-2e31d0df20ab" ginger_software_uiphraseguid="301fb163-845b-46c6-b99c-4a2dc35b3265" class="GINGER_SOFTWARE_mark">.</gs>Copy
<gs id="7f44caa7-8048-4b19-a597-dc4cab981739" ginger_software_uiphraseguid="a672e506-1ada-4d15-baec-2c65a7db999e" class="GINGER_SOFTWARE_mark">ws</gs><gs id="6f5a97ad-6fa6-4750-a8b4-1ef8a05cebad" ginger_software_uiphraseguid="a672e506-1ada-4d15-baec-2c65a7db999e" class="GINGER_SOFTWARE_mark">.</gs>Rows<gs id="2a0408ce-364e-4405-b61f-05c81f3b2544" ginger_software_uiphraseguid="a672e506-1ada-4d15-baec-2c65a7db999e" class="GINGER_SOFTWARE_mark">(</gs><gs id="b2e74fc1-043e-4ff6-92f7-c23b4265009a" ginger_software_uiphraseguid="a672e506-1ada-4d15-baec-2c65a7db999e" class="GINGER_SOFTWARE_mark">wsRow</gs> & ":" & <gs id="fe01a09a-4374-4f7d-ae72-f2919a5108e2" ginger_software_uiphraseguid="a672e506-1ada-4d15-baec-2c65a7db999e" class="GINGER_SOFTWARE_mark">wsRow</gs>)<gs id="0f52a33a-c843-4772-a095-7cc5e94b9135" ginger_software_uiphraseguid="a672e506-1ada-4d15-baec-2c65a7db999e" class="GINGER_SOFTWARE_mark">.</gs>PasteSpecial _
Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
Application<gs id="052fd877-7efa-4784-9ce9-544d51338357" ginger_software_uiphraseguid="5222341e-0896-4f41-8cf5-dff57eb08f43" class="GINGER_SOFTWARE_mark">.</gs>CutCopyMode = False
End Sub
Private Sub Reset<gs id="84f29b22-c957-49f4-a9fb-f22c05be7f03" ginger_software_uiphraseguid="24934634-ed30-4338-86f1-6d808dc08d08" class="GINGER_SOFTWARE_mark">(</gs>ByRef x As Boolean)
<gs id="4a9895e0-ebf4-4281-a308-c23fc0d34fb9" ginger_software_uiphraseguid="4335905d-4672-4671-b605-0550f3ec7b90" class="GINGER_SOFTWARE_mark">x</gs> = False
End Sub
Private Sub InsertSheet<gs id="c5ecee02-4f18-4d65-a2e2-e9b3f49311c9" ginger_software_uiphraseguid="3711a649-5764-4ddc-adaa-b9ced4b815d5" class="GINGER_SOFTWARE_mark">(</gs><gs id="db1d4f2b-8bfb-4e01-aaf1-34880fa0e4f9" ginger_software_uiphraseguid="3711a649-5764-4ddc-adaa-b9ced4b815d5" class="GINGER_SOFTWARE_mark">shName</gs> As String, ByRef sh As Worksheet, ByRef ws As Worksheet, DDNameColumn As String)
Dim <gs id="96f51786-58ac-47a6-bf99-cd78060a5166" ginger_software_uiphraseguid="680a4af4-709f-4d7b-a419-276d2b82f296" class="GINGER_SOFTWARE_mark">wsRow</gs> As Long
Worksheets<gs id="b16e97dd-52b5-4af8-b0b5-8dd885a97cce" ginger_software_uiphraseguid="8026002d-f9c2-49b0-a824-17afbc72faef" class="GINGER_SOFTWARE_mark">.</gs>Add<gs id="eb4a366a-5b7b-403d-b6cf-c2d3233cbeeb" ginger_software_uiphraseguid="8026002d-f9c2-49b0-a824-17afbc72faef" class="GINGER_SOFTWARE_mark">(</gs>After<gs id="9f8fde89-31c4-45c6-a879-722ee0d28a9f" ginger_software_uiphraseguid="8026002d-f9c2-49b0-a824-17afbc72faef" class="GINGER_SOFTWARE_mark">:</gs>=Worksheets<gs id="8a824cd9-a897-4e95-836c-235173e0193c" ginger_software_uiphraseguid="8026002d-f9c2-49b0-a824-17afbc72faef" class="GINGER_SOFTWARE_mark">(</gs>Worksheets<gs id="c4a32479-42f0-42cc-b58b-db1d59c99a7c" ginger_software_uiphraseguid="8026002d-f9c2-49b0-a824-17afbc72faef" class="GINGER_SOFTWARE_mark">.</gs>Count))<gs id="8b6ff402-e5d8-425b-8864-5650ac8576df" ginger_software_uiphraseguid="8026002d-f9c2-49b0-a824-17afbc72faef" class="GINGER_SOFTWARE_mark">.</gs>Name = <gs id="c57dc6d9-e8c7-4a61-ab88-587fa5ccaeb7" ginger_software_uiphraseguid="8026002d-f9c2-49b0-a824-17afbc72faef" class="GINGER_SOFTWARE_mark">shName</gs>
With ActiveSheet<gs id="3648da31-87e5-4116-8c59-afa653782f5f" ginger_software_uiphraseguid="fad1caa8-cd4c-4209-aeb5-e6c44b8b1dd3" class="GINGER_SOFTWARE_mark">.</gs>PageSetup
<gs id="0e29080b-417c-43be-8a60-dec848154151" ginger_software_uiphraseguid="2b6709cc-285d-4274-83d9-97440aa65a11" class="GINGER_SOFTWARE_mark">.</gs><gs id="bab2f2d0-be7f-48b6-a91f-1776094e6bd9" ginger_software_uiphraseguid="2b6709cc-285d-4274-83d9-97440aa65a11" class="GINGER_SOFTWARE_mark">CenterHeader</gs> = "<gs id="2a05c31c-667f-415e-854d-957a0264245c" ginger_software_uiphraseguid="2b6709cc-285d-4274-83d9-97440aa65a11" class="GINGER_SOFTWARE_mark">CompanyA</gs> " & <gs id="5ef92992-d6fc-471c-891c-47943512cdae" ginger_software_uiphraseguid="2b6709cc-285d-4274-83d9-97440aa65a11" class="GINGER_SOFTWARE_mark">shName</gs> & Chr<gs id="d9917a67-f35d-4462-912f-5a75e28afe29" ginger_software_uiphraseguid="2b6709cc-285d-4274-83d9-97440aa65a11" class="GINGER_SOFTWARE_mark">(</gs>10) & "As of FY " & <gs id="b7f6cdc4-1ebd-43f8-9b8d-3744a1b28159" ginger_software_uiphraseguid="2b6709cc-285d-4274-83d9-97440aa65a11" class="GINGER_SOFTWARE_mark">uPeriod</gs>
<gs id="f187dd37-8c6d-4ab2-833d-47eed4bc74a3" ginger_software_uiphraseguid="bc9660b1-c913-49df-b9d8-910dafb298dc" class="GINGER_SOFTWARE_mark">.</gs><gs id="d69398ea-6549-4e1e-9521-8574dbf0d7ee" ginger_software_uiphraseguid="bc9660b1-c913-49df-b9d8-910dafb298dc" class="GINGER_SOFTWARE_mark">CenterFooter</gs> = "Page &P of &N"
<gs id="0251c125-0f58-449a-b62a-8df942e43372" ginger_software_uiphraseguid="b7077b95-6551-404d-885e-20a80fccce46" class="GINGER_SOFTWARE_mark">.</gs>Orientation = <gs id="b764b829-9f4e-4297-b8e0-b2a0537446af" ginger_software_uiphraseguid="b7077b95-6551-404d-885e-20a80fccce46" class="GINGER_SOFTWARE_mark">xlLandscape</gs> ' or <gs id="8914b78f-f100-482d-acac-b9a0fc23bad8" ginger_software_uiphraseguid="b7077b95-6551-404d-885e-20a80fccce46" class="GINGER_SOFTWARE_mark">xlPortrait</gs>
<gs id="d19268d8-c6d5-4a9a-8606-6f5d3e198087" ginger_software_uiphraseguid="fe2c9ab5-2aaa-489a-b639-10df47e15af9" class="GINGER_SOFTWARE_mark">.</gs><gs id="909ff630-a136-435f-a15b-fad0d9c72c6b" ginger_software_uiphraseguid="fe2c9ab5-2aaa-489a-b639-10df47e15af9" class="GINGER_SOFTWARE_mark">PaperSize</gs> = <gs id="f563e328-eb88-4335-8781-5513a2754f4b" ginger_software_uiphraseguid="fe2c9ab5-2aaa-489a-b639-10df47e15af9" class="GINGER_SOFTWARE_mark">xlPaperLegal</gs>
End With
<gs id="649e72f2-0329-4a4e-b21c-84cfcc1b3e9e" ginger_software_uiphraseguid="e6f4c9f9-c19a-44b1-9be5-c445cf8a25b7" class="GINGER_SOFTWARE_mark">sh</gs><gs id="b23bc7ae-9adc-4d9a-9656-ad13f19aa79a" ginger_software_uiphraseguid="e6f4c9f9-c19a-44b1-9be5-c445cf8a25b7" class="GINGER_SOFTWARE_mark">.</gs>Rows<gs id="44214b0e-c9e2-4448-a0bb-5608da79e0af" ginger_software_uiphraseguid="e6f4c9f9-c19a-44b1-9be5-c445cf8a25b7" class="GINGER_SOFTWARE_mark">(</gs>"1:1")<gs id="3ba3dc83-44cf-485c-965e-993c4a7a5e29" ginger_software_uiphraseguid="e6f4c9f9-c19a-44b1-9be5-c445cf8a25b7" class="GINGER_SOFTWARE_mark">.</gs>Copy
Set <gs id="cf710ede-ad31-4719-89f6-4fe06bd130ae" ginger_software_uiphraseguid="6fdaf474-2a23-4c6d-b9ac-3a93bfb85348" class="GINGER_SOFTWARE_mark">ws</gs> = Sheets<gs id="252fbd64-7bdc-4fc7-8500-c8d836996ad0" ginger_software_uiphraseguid="6fdaf474-2a23-4c6d-b9ac-3a93bfb85348" class="GINGER_SOFTWARE_mark">(</gs>Worksheets<gs id="0faf17bf-4d3a-4623-a041-32632a2abd84" ginger_software_uiphraseguid="6fdaf474-2a23-4c6d-b9ac-3a93bfb85348" class="GINGER_SOFTWARE_mark">.</gs>Count)
<gs id="ea7afcad-5d51-4086-9d49-0da74dc771df" ginger_software_uiphraseguid="6ee2833d-b1e0-4a19-b9fa-b19ffcadaaeb" class="GINGER_SOFTWARE_mark">ws</gs><gs id="23294e52-bcaa-4a73-b146-d00d212e51ed" ginger_software_uiphraseguid="6ee2833d-b1e0-4a19-b9fa-b19ffcadaaeb" class="GINGER_SOFTWARE_mark">.</gs>Rows<gs id="a53ba2b4-f5b6-4c36-9b92-34473379c35d" ginger_software_uiphraseguid="6ee2833d-b1e0-4a19-b9fa-b19ffcadaaeb" class="GINGER_SOFTWARE_mark">(</gs>"1:1")<gs id="6e542758-d3ae-497c-94d4-87bf4cc1252f" ginger_software_uiphraseguid="6ee2833d-b1e0-4a19-b9fa-b19ffcadaaeb" class="GINGER_SOFTWARE_mark">.</gs>PasteSpecial _
Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
Application<gs id="c254354f-0eda-458d-8c45-8c4b84decf9c" ginger_software_uiphraseguid="ede551ba-9132-425f-a9cb-c25fc94095bd" class="GINGER_SOFTWARE_mark">.</gs>CutCopyMode = False
End Sub
Private Sub ModifyHDR<gs id="dbc2bec7-823e-4cd8-b697-742dde8af596" ginger_software_uiphraseguid="77e4bc6a-c125-48f1-8892-237e3cd3fc1a" class="GINGER_SOFTWARE_mark">(</gs><gs id="a8875995-d0f4-402f-b9cc-0a1af00913fe" ginger_software_uiphraseguid="77e4bc6a-c125-48f1-8892-237e3cd3fc1a" class="GINGER_SOFTWARE_mark">shName</gs> As String, ByRef sh As Worksheet, ByRef ws As Worksheet, DDNameColumn As String)
Range<gs id="6c3db8ce-7652-4ab0-9eaf-8d26aac36ccb" ginger_software_uiphraseguid="2a257882-641b-47c5-849f-94b2d772a129" class="GINGER_SOFTWARE_mark">(</gs>"A1<gs id="8d45c13c-f99f-4dc8-aaa9-0eb72a40c2db" ginger_software_uiphraseguid="2a257882-641b-47c5-849f-94b2d772a129" class="GINGER_SOFTWARE_mark">:</gs>M1")<gs id="e0ddfc74-8338-47ba-b7a7-482b656e58c2" ginger_software_uiphraseguid="2a257882-641b-47c5-849f-94b2d772a129" class="GINGER_SOFTWARE_mark">.</gs>Select
Selection<gs id="4fdb5a44-f50d-4887-a24b-2e5814ee7f6d" ginger_software_uiphraseguid="9a5e416d-80aa-4144-b2ca-a71405f3d84c" class="GINGER_SOFTWARE_mark">.</gs>Font<gs id="43ac19b0-d034-46e4-a59c-cc60cbcba0ec" ginger_software_uiphraseguid="9a5e416d-80aa-4144-b2ca-a71405f3d84c" class="GINGER_SOFTWARE_mark">.</gs>Bold = True
With Selection<gs id="c761d0f4-647e-4429-9125-52a39881115f" ginger_software_uiphraseguid="f84dfd01-00b7-43d6-aded-466c89c4c29a" class="GINGER_SOFTWARE_mark">.</gs>Interior
<gs id="2805f538-1cc4-44b6-b8ea-e34a31741289" ginger_software_uiphraseguid="eb745a94-2b69-4d22-bbc7-eb425b959d57" class="GINGER_SOFTWARE_mark">.</gs>Pattern = <gs id="770c7664-ec55-4326-a60c-a8d0a5c04e9f" ginger_software_uiphraseguid="eb745a94-2b69-4d22-bbc7-eb425b959d57" class="GINGER_SOFTWARE_mark">xlSolid</gs>
<gs id="721379d1-51c2-4dc7-b2af-eb9e8235975c" ginger_software_uiphraseguid="a431743b-897a-4228-8458-655b6198eb0b" class="GINGER_SOFTWARE_mark">.</gs><gs id="c6d53061-4c64-4eeb-b619-bbaa90f53c47" ginger_software_uiphraseguid="a431743b-897a-4228-8458-655b6198eb0b" class="GINGER_SOFTWARE_mark">PatternColorIndex</gs> = <gs id="1514e95d-f889-4376-bf8c-79e0ebe84070" ginger_software_uiphraseguid="a431743b-897a-4228-8458-655b6198eb0b" class="GINGER_SOFTWARE_mark">xlAutomatic</gs>
<gs id="343a9b11-7b1b-4337-bdc9-2f03abbec01a" ginger_software_uiphraseguid="327cf033-3184-460c-8c65-59651fb4af79" class="GINGER_SOFTWARE_mark">.</gs><gs id="f57b6816-018d-4ed5-a789-d38cfffd2466" ginger_software_uiphraseguid="327cf033-3184-460c-8c65-59651fb4af79" class="GINGER_SOFTWARE_mark">ThemeColor</gs> = xlThemeColorLight2
<gs id="d0da7c11-6470-45e3-a7a6-6977ba27dfe1" ginger_software_uiphraseguid="c1686971-9ebf-45e5-ae20-2ce060b3f12d" class="GINGER_SOFTWARE_mark">.</gs><gs id="8dfcdc87-f034-4a24-8749-1a67b0a9d684" ginger_software_uiphraseguid="c1686971-9ebf-45e5-ae20-2ce060b3f12d" class="GINGER_SOFTWARE_mark">TintAndShade</gs> = 0.799981688894314
<gs id="7d4431bf-f9ce-4eaf-b079-a1583d3a5cc0" ginger_software_uiphraseguid="11565cf4-9012-4957-87bf-d36a72c9f7cc" class="GINGER_SOFTWARE_mark">.</gs><gs id="33a86bf7-227a-4eed-876e-37de87052739" ginger_software_uiphraseguid="11565cf4-9012-4957-87bf-d36a72c9f7cc" class="GINGER_SOFTWARE_mark">PatternTintAndShade</gs> = 0
End With
End Sub
Sub PeriodInputBox<gs id="1fb61c3e-7151-46de-bfbf-8bd7e807ec04" ginger_software_uiphraseguid="c12fcab2-5f03-40cf-8c56-c19cbd069d71" class="GINGER_SOFTWARE_mark">(</gs><gs id="72870a3f-0053-4480-8eef-25dbda44ed32" ginger_software_uiphraseguid="c12fcab2-5f03-40cf-8c56-c19cbd069d71" class="GINGER_SOFTWARE_mark">uPeriod</gs> As String)
<gs id="cc91f3f2-7559-45d9-890d-89e7214bf232" ginger_software_uiphraseguid="b90af1fb-fb24-44ed-868d-72809174472f" class="GINGER_SOFTWARE_mark">uPeriod</gs> = InputBox<gs id="ddaa4031-cf11-4728-92ba-a75febff3530" ginger_software_uiphraseguid="b90af1fb-fb24-44ed-868d-72809174472f" class="GINGER_SOFTWARE_mark">(</gs>"Please enter the period for this report (YYYY P##)")
End Sub<gs id="f246d9b6-50ad-4cec-b2b0-5ab076ca0f47" ginger_software_uiphraseguid="fd7dd6e0-be37-48ed-8076-dbaf8282c943" class="GINGER_SOFTWARE_mark">[</gs>/CODE]