MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Number keys on a userform


Posted by Russell on December 07, 2001 2:26 PM

I have a large userform (the size of the entire screen) that I have added some buttons for numbers. I would like to have a macro that will input the number in the active cell. I have the macro to put the single digits in using the activecell, insert formula "7". But I need to input mulitple numbers in the active cell. Like 34, by hitting a 3 button and a 4 button. How do I do this, if you can give me a starting point to at least start researching from.

Thanks a Million!!


Posted by Juan Pablo G. on December 08, 2001 12:21 PM

I'm not sure what you mean but maybe this is it:

ActiveCell = ActiveCell & "4"

or

ActiveCell = ActiveCell*10 + 4

Juan Pablo G.