I have a workbook that has a print report button on it, and when that button is pushed a macro runs and it consolidates the tabs into set print areas and titles and gives me a built PDF report with cover pages and graphs and the consolidated information that is in the tabs, it also saves that PDF on the desktop. However anytime this title page has a / on in the billing information area, it throws the macro and gives me this error,
ActiveWorkbook.ExportAsFixedFormat 0, Environ("USERPROFILE") & "\Desktop\" & _
Sheets("General").Range("C3").Value & " - " & Sheets("General").Range("C4").Value & " Drill Pipe Inspection Report " & " (" & Format(Date, "mm-dd-yyyy") & ")" & ".pdf", OpenAfterPublish:=True
Is there a way to fix this error or is there a way where I can make it to where the columns reject the input if a / is detected?
ActiveWorkbook.ExportAsFixedFormat 0, Environ("USERPROFILE") & "\Desktop\" & _
Sheets("General").Range("C3").Value & " - " & Sheets("General").Range("C4").Value & " Drill Pipe Inspection Report " & " (" & Format(Date, "mm-dd-yyyy") & ")" & ".pdf", OpenAfterPublish:=True
Is there a way to fix this error or is there a way where I can make it to where the columns reject the input if a / is detected?
DRILCO DP Report V4.4.xlsb | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | |||
1 | Billing Information | Inspection Performed (dropdown list) | Specification Used (dropdown list) | |||||||||||||||||
2 | Date: | January 2, 2022 | ||||||||||||||||||
3 | Customer: | |||||||||||||||||||
4 | Rig: | H/P 22 | ||||||||||||||||||
5 | Well/Location: | |||||||||||||||||||
6 | Ordered By: | |||||||||||||||||||
7 | Tube Specs | |||||||||||||||||||
8 | OCSG: | Size | ||||||||||||||||||
9 | PO #: | Grade | ||||||||||||||||||
10 | Quote #: | Weight | ||||||||||||||||||
11 | New Wall | |||||||||||||||||||
12 | Reports Available | Include Report? (dropdown list) | Min Wall | |||||||||||||||||
13 | JOB#: | Overview | Yes | Tool Joint Specs | ||||||||||||||||
14 | Inspected at: | Drill Pipe | Yes | New OD | ||||||||||||||||
15 | Images | Yes | Min OD | |||||||||||||||||
16 | Personnel Info | Appendix | Yes | Max Pin ID | ||||||||||||||||
17 | Lead Inspector | Summary | Yes | Min TS Box | ||||||||||||||||
18 | Monitor | DS1 Reference | Yes | Min TS Pin | ||||||||||||||||
19 | Inspector Helper(s) | Recommend HB | ||||||||||||||||||
20 | Range | |||||||||||||||||||
21 | Connection | |||||||||||||||||||
22 | Box Length Min | |||||||||||||||||||
23 | Box Length Max | |||||||||||||||||||
24 | Pin Length Min | |||||||||||||||||||
25 | Pin Length Max | |||||||||||||||||||
26 | ||||||||||||||||||||
General |
Cells with Data Validation | ||
---|---|---|
Cell | Allow | Criteria |
J13:J19 | List | =Lists!$G$3:$G$4 |
N2:R5 | List | =Lists!$H$1:$H$14 |
F2:L10 | List | =Lists!$A$9:$A$19 |
O8 | List | =Lists!$H$23:$H$30 |
O9 | List | =Lists!$H$17:$H$20 |
O20 | List | =Lists!$H$33:$H$34 |