Hello,
I am trying to set a variable to equal the contents of a cell that has to always have two digits, "00". I've formatted the cell as a number with two digits (cell formatting is 00), and have tried pulling the .text and or the .value of the cell, but the variable always ends up just equally the single digit (if the value is less than 10).
Code:
I have L17 set at 9 right now (or 09, with formatting), but in my local window, GLMonth always ends up at just '9'. Thoughts? I need both digits as I intend to use the value for another lookup.
I am trying to set a variable to equal the contents of a cell that has to always have two digits, "00". I've formatted the cell as a number with two digits (cell formatting is 00), and have tried pulling the .text and or the .value of the cell, but the variable always ends up just equally the single digit (if the value is less than 10).
Code:
Code:
Sub Test
Dim GLMonth as Long
GLMonth = ThisWorkbook.Sheets("SLICE").Range("L17").Text
End Sub
I have L17 set at 9 right now (or 09, with formatting), but in my local window, GLMonth always ends up at just '9'. Thoughts? I need both digits as I intend to use the value for another lookup.