Hi James,
I think your problem may be in the Spreadsheet and not in the UserForm. I think you should probably format the Spreadsheet cells as text. Without previous formatting text is displayed as left justified and numbers are displayed as right justified in the spreadsheet.
1. You might want to try retrieving the data from the Spreadsheet as text. In my applications that require numeric values in cells, I usually read them as text first and then convert to numbers in order to catch bad values in the spreadsheet without having to use 'on error'.
Try replacing:
with something like:
2. Alternatively, without modifying the spreadsheet, you could convert both the actual password and the user entered password to strings such as:
If this doesn't work there are more complicated scenarios that you can use.
Lewis
Bookmarks