I have a Case statement, part of which looks like:
The GetPrinterDetails.PortName is an element of a structure that is populated by a routine that interrogates the OS about the printer. The Case statement is obviously checking for the port name in lowercase (\\scofp1\reslet2c), whereas, I've just discovered that sometimes the OS will return it in a different case, (eg \\SCOFP1\reslet2c).
I'd like to force the check to lowercase. I assume I need to use the ToLower function, but I'm not sure how to use it. I've been trying things along the lines of:
I think the 'logic' here would do the trick, but I'm obviously not using the correct command syntax!
David
Code:
Select Case GetPrinterDetails.PortName
Case "\\scofp1\reslet2c"
' HP LaserJet Colour 4650dtn
Tray1 = 260
' etc
End Select
The GetPrinterDetails.PortName is an element of a structure that is populated by a routine that interrogates the OS about the printer. The Case statement is obviously checking for the port name in lowercase (\\scofp1\reslet2c), whereas, I've just discovered that sometimes the OS will return it in a different case, (eg \\SCOFP1\reslet2c).
I'd like to force the check to lowercase. I assume I need to use the ToLower function, but I'm not sure how to use it. I've been trying things along the lines of:
Code:
Select Case ToLower(GetPrinterDetails.PortName)
Case "\\scofp1\reslet2c"
' HP LaserJet Colour 4650dtn
Tray1 = 260
' etc
End Select
I think the 'logic' here would do the trick, but I'm obviously not using the correct command syntax!
David