Hi,
I am writing a simple procedure in a Worksheet_SelectionChange sub where I need to read a number from the spreadsheet and use it in calculations but the calculations are turning out wrong and I have tracked it down to a decimal number being somehow converted to an integer. In the procedure:
Dim VolFlow As Long
VolFlow = Cells(10, 9)
If I enter the number 1.4 into the spreadsheet VolFlow becomes truncated to 1 and if I enter 1.6 VolFlow becomes 2. Cells(10, 9) has no special formatting, but that shouldn't affect this should it? Any help would be gratefully received thanks!
OK - Got it - I'm really rusty! Long is a Long int isn't it!!!
Cheers,
Nick
Bookmarks