I need help with the final touches on this portion of this code. I am trying to use the entry of the "LOT" to activate or select the open workbook with that entry. So if 1023987 was entered, I would want 1023987.WQ1 to activate on the desktop. I have posted a couple of my tries so far.
Code:
Dim PC As Range, LOT As Range, myDate As Range
Dim LOTsrch As Variant, NewWB As Workbook
Set PC = Range("E2")
Set LOT = Range("E4")
Set myDate = Range("E6")
PC = InputBox("Please enter the PRODUCT CODE.", "Product Code")
LOT = InputBox("Please enter the LOT NUMBER.", "Lot Number")
myDate = InputBox("Please enter the DATE of CAMPAIGN.", "Date", Date)
Set LOTsrch = LOT
Set NewWB = LOT
With NewWB
.Select
End With
Code:
Dim PC As Range, LOT As Range, myDate As Range
Dim LOTsrch As Variant, NewWB As Workbook
Set PC = Range("E2")
Set LOT = Range("E4")
Set myDate = Range("E6")
PC = InputBox("Please enter the PRODUCT CODE.", "Product Code")
LOT = InputBox("Please enter the LOT NUMBER.", "Lot Number")
myDate = InputBox("Please enter the DATE of CAMPAIGN.", "Date", Date)
Set LOTsrch = LOT
Workbooks(LOT).Sheets("Ash").Activate
Code:
Dim PC As Range, LOT As Range, myDate As Range
Dim LOTsrch As Variant
Set PC = Range("E2")
Set LOT = Range("E4")
Set myDate = Range("E6")
PC = InputBox("Please enter the PRODUCT CODE.", "Product Code")
LOT = InputBox("Please enter the LOT NUMBER.", "Lot Number")
myDate = InputBox("Please enter the DATE of CAMPAIGN.", "Date", Date)
Set LOTsrch = LOT
Windows(LOT).Activate