Giordano Bruno
Well-known Member
- Joined
- Jan 7, 2007
- Messages
- 1,356
I have the following code line which I am using to distinguish between similar files.
If Workbooks(s).Sheets("Accounts").Range("A1").Value > 1 Then
A marker for the two file types is contained in a cell on the "Accounts" tab. This will be either the text "Password" or the value 2.
When the code find the correct workbook, it checks the contents of A1 and will find either "Password" or 2 depending upon which file it has found.
If it finds "Password", it should skip to the 'Else' code lines, but instead it runs the next line of code after 'Then'. Does this mean that the text string "Password" is greater than the value 2
Given that the values in the cells are either the word "Password" or the value 2, how should I distinguish between them if I cannot use > 2
If Workbooks(s).Sheets("Accounts").Range("A1").Value > 1 Then
A marker for the two file types is contained in a cell on the "Accounts" tab. This will be either the text "Password" or the value 2.
When the code find the correct workbook, it checks the contents of A1 and will find either "Password" or 2 depending upon which file it has found.
If it finds "Password", it should skip to the 'Else' code lines, but instead it runs the next line of code after 'Then'. Does this mean that the text string "Password" is greater than the value 2
Given that the values in the cells are either the word "Password" or the value 2, how should I distinguish between them if I cannot use > 2