S
Sean Stuber
I can't seem to get Serial, Model_Type, and Parking_Loc to hold a value.
Is there something wrong with this code?
Also, is there a command that will make the program do nothing...ie. I
used "beep" below but that's annoying.
----
Sheets("Report").Unprotect
strDate = Format(Date, "mm-dd-yy") & " " & Format(Time,
"h:mm:ss")
Worksheets("Report").Cells(1, 1) = "Inventory Report for " &
strDate
For Each Sh In Worksheets
If Sh.Name = "Start-Instructions" Or Sh.Name = "Log" Or Sh.Name
= "Report" Or Sh.Name = "NewReport" Then
Beep
Else
'\ Report on Inventory Data
Sheets("Report").Unprotect
Dim Serial As String
Dim Model_Type As String
Dim Parking_Loc As String
Row = Worksheets("Report").Range("Report_Value").Cells(1,
1).Value
Serial = Sh.Cells(4, 7).Value
Model_Type = Sh.Cells(4, 11).Value
Parking_Loc = Sh.Cells(4, 9).Value
Info1 = "Serial #" & Serial & " (" & Model_Type & ") "
Info2 = " is located at " & Parking_Loc
Worksheets("Report").Cells(Row, 1) = Info1 & Info2
Worksheets("Report").Activate
Columns("A:A").EntireColumn.AutoFit
Range("a1").Select
Sheets("Report").Protect
End If
Next Sh
Is there something wrong with this code?
Also, is there a command that will make the program do nothing...ie. I
used "beep" below but that's annoying.
----
Sheets("Report").Unprotect
strDate = Format(Date, "mm-dd-yy") & " " & Format(Time,
"h:mm:ss")
Worksheets("Report").Cells(1, 1) = "Inventory Report for " &
strDate
For Each Sh In Worksheets
If Sh.Name = "Start-Instructions" Or Sh.Name = "Log" Or Sh.Name
= "Report" Or Sh.Name = "NewReport" Then
Beep
Else
'\ Report on Inventory Data
Sheets("Report").Unprotect
Dim Serial As String
Dim Model_Type As String
Dim Parking_Loc As String
Row = Worksheets("Report").Range("Report_Value").Cells(1,
1).Value
Serial = Sh.Cells(4, 7).Value
Model_Type = Sh.Cells(4, 11).Value
Parking_Loc = Sh.Cells(4, 9).Value
Info1 = "Serial #" & Serial & " (" & Model_Type & ") "
Info2 = " is located at " & Parking_Loc
Worksheets("Report").Cells(Row, 1) = Info1 & Info2
Worksheets("Report").Activate
Columns("A:A").EntireColumn.AutoFit
Range("a1").Select
Sheets("Report").Protect
End If
Next Sh