Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Dim mySheets As Long
- Dim myActiveSheet As String
- Dim standardSheetNumber As Long
- Dim moduleStart As Long
- Dim Model As String
- Dim CompanyName As String
- Dim Address As String
- Dim City As String
- Dim State As String
- Dim ZipCode As String
- moduleStart = 0
- standardSheetNumber = 19
- mySheets = Worksheets.Count - 3
- For i = standardSheetNumber To mySheets
- 'Create Layout
- Cells(moduleStart + 2, 1).Value = "Contract Type: CPC"
- Range(Cells(moduleStart + 2, 1), Cells(moduleStart + 2, 9)).Merge
- Range(Cells(moduleStart + 2, 1), Cells(moduleStart + 2, 9)).Font.Bold = True
- Cells(moduleStart + 3, 1).Value = "Model"
- Range(Cells(moduleStart + 3, 1), Cells(moduleStart + 3, 3)).Merge
- Range(Cells(moduleStart + 3, 1), Cells(moduleStart + 3, 3)).Font.Bold = True
- Cells(moduleStart + 5, 1).Value = "Additional Fixed Charge"
- Range(Cells(moduleStart + 5, 1), Cells(moduleStart + 5, 3)).Merge
- Range(Cells(moduleStart + 5, 1), Cells(moduleStart + 5, 3)).Font.Bold = True
- Cells(moduleStart + 6, 1).Value = "NO"
- Cells(moduleStart + 7, 1).Value = "Fixed Charge Description (if applicable):"
- Cells(moduleStart + 9, 1).Value = "Blk"
- Cells(moduleStart + 10, 1).Value = "Clr"
- Cells(moduleStart + 12, 1).Value = "SHIP TO:"
- Cells(moduleStart + 13, 1).Value = "Account #:"
- Cells(moduleStart + 14, 1).Value = "Name"
- Cells(moduleStart + 15, 1).Value = "Address"
- Cells(moduleStart + 19, 1).Value = "Special Provisions:"
- Cells(moduleStart + 6, 2).Value = "YES"
- Cells(moduleStart + 8, 2).Value = "Image Change"
- Cells(moduleStart + 9, 2).Value = 0
- Cells(moduleStart + 10, 2).Value = 0
- Cells(moduleStart + 3, 4).Value = "Serial#"
- Cells(moduleStart + 5, 4).Value = "Fix Change Amount"
- Cells(moduleStart + 8, 5).Value = "Agreed Volume"
- Cells(moduleStart + 9, 5).Value = 0
- Cells(moduleStart + 10, 5).Value = 0
- Cells(moduleStart + 3, 6).Value = "Installed Date"
- Cells(moduleStart + 5, 6).Value = "Billing Frequency"
- Cells(moduleStart + 13, 6).Value = "Meter Read Contact:"
- Cells(moduleStart + 14, 6).Value = "Phone #:"
- Cells(moduleStart + 15, 6).Value = "Fax #:"
- Cells(moduleStart + 15, 6).Value = "Email:"
- Cells(moduleStart + 14, 7).Value = 0
- Cells(moduleStart + 15, 7).Value = 0
- Cells(moduleStart + 15, 7).Value = 0
- Cells(moduleStart + 8, 8).Value = "Meter Start"
- Cells(moduleStart + 3, 9).Value = "Service Fee"
- Cells(moduleStart + 5, 9).Value = "Initial Period"
- Cells(moduleStart + 6, 9).Value = 60
- Cells(moduleStart + 19, 9).Value = "Customer Intial:"
- 'Get Sheet name
- myActiveSheet = Sheets(i).Name
- 'Get Model
- Model = Sheets(myActiveSheet).Cells(16, 2).Value
- Cells(moduleStart + 4, 1).Value = Model
- 'Get CompanyName from sheet
- CompanyName = Sheets(myActiveSheet).Cells(7, 2).Value
- Cells(moduleStart + 14, 2).Value = CompanyName
- 'Get Address from sheet
- Address = Sheets(myActiveSheet).Cells(8, 2).Value
- Cells(moduleStart + 15, 2).Value = Address
- 'Get City from sheet
- City = Sheets(myActiveSheet).Cells(9, 2).Value
- Cells(moduleStart + 16, 2).Value = City
- 'Get State from sheet
- State = Sheets(myActiveSheet).Cells(10, 2).Value
- Cells(moduleStart + 17, 2).Value = State
- 'Get ZipCode from sheet
- ZipCode = Sheets(myActiveSheet).Cells(11, 2).Value
- Cells(moduleStart + 18, 2).Value = ZipCode
- moduleStart = moduleStart + 20
- Next i
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement