willyboy58
Technical User
I have the following procedures that make up one big procedure to print labels:
Sub HelensLabelsAll()
SelectDate
EmployeeCostCenterNumberParsing
SortCCandName
InsertBlankRow
MoveCCNumber
InsertDate
ThreeColumns
Insert2ndBlankRow
AdjustCellWidth
LeftJustify
RenameLabelSheet
End Sub
The “SelectDate” procedure is as follows:
Sub SelectDate()
Dim ReportMonth As String
ReportMonth = InputBox("Enter FULL name of month and use FOUR DIGIT" _
& " year notation. If you want to exit now" _
& "DO NOT enter anything. Just select OK" _
, "Month And Year"
If ReportMonth = "" Then
End 'kills everything
End If
End Sub
After entering the desired date, all procedures run as they should except for “InsertDate”. It does not insert the date from the “SelectDate” procedure’s variable “ReportMonth”. “InsertDate” is below:
Sub InsertDate()
Range("A1"
.Select
While Not IsEmpty(ActiveCell)
ActiveCell.Offset(2, 0).Select
Selection.EntireRow.Select
Selection.Insert
ActiveCell.Value = ReportMonth
DateFormat 'procedure to format date
ActiveCell.Offset(1, 0).Select
Wend
Range("A1"
.Select
End Sub
If I combine the two procedures and put them towards the end of “HelensLabelsAll” then I get the date to appear where I need it, but I want to enter the date at the beginning.
What am I missing?
TIA. Bill
Sub HelensLabelsAll()
SelectDate
EmployeeCostCenterNumberParsing
SortCCandName
InsertBlankRow
MoveCCNumber
InsertDate
ThreeColumns
Insert2ndBlankRow
AdjustCellWidth
LeftJustify
RenameLabelSheet
End Sub
The “SelectDate” procedure is as follows:
Sub SelectDate()
Dim ReportMonth As String
ReportMonth = InputBox("Enter FULL name of month and use FOUR DIGIT" _
& " year notation. If you want to exit now" _
& "DO NOT enter anything. Just select OK" _
, "Month And Year"
If ReportMonth = "" Then
End 'kills everything
End If
End Sub
After entering the desired date, all procedures run as they should except for “InsertDate”. It does not insert the date from the “SelectDate” procedure’s variable “ReportMonth”. “InsertDate” is below:
Sub InsertDate()
Range("A1"
While Not IsEmpty(ActiveCell)
ActiveCell.Offset(2, 0).Select
Selection.EntireRow.Select
Selection.Insert
ActiveCell.Value = ReportMonth
DateFormat 'procedure to format date
ActiveCell.Offset(1, 0).Select
Wend
Range("A1"
End Sub
If I combine the two procedures and put them towards the end of “HelensLabelsAll” then I get the date to appear where I need it, but I want to enter the date at the beginning.
What am I missing?
TIA. Bill