Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
HRman wrote:
Hi, I have a piece of code that promts for an employee number which may or may not have a leading zero. If I print out the employee number using msgbox it has the leading zero, but when i place it on a worksheet, the leading zero disappears. dim empno as string empno = inputbox("enter the employee number") msgbox ""+empno+"<" worksheets("sheet1").cells(1,2).value = empno Any suggestions ? Because Execel treats your result as a number and cuts leading zeros. worksheets("sheet1").cells(1,2).value = "'" & empno |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Lookup returns unexpected result | Excel Worksheet Functions | |||
Unexpected Result | Excel Worksheet Functions | |||
FV Function result is unexpected. | Excel Worksheet Functions | |||
Unexpected result | Excel Worksheet Functions | |||
FileSearch gives unexpected result | Excel Programming |