Thread: UserForm Help
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
MESTRELLA29[_2_] MESTRELLA29[_2_] is offline
external usenet poster
 
Posts: 34
Default UserForm Help

OK Thanks it worked, but what is "CDBL"

"Tom Ogilvy" wrote:

Without seeing what is stored in the textbox:

Private Sub cmbok_Click()
Application.Goto Reference:="concepto"
Selection.End(xlDown).Select
ActiveCell.Offset(rowOffset:=1, columnOffset:=0).Select
ActiveCell = cdbl(txtconcepto)
Application.Goto Reference:="monto"
Selection.End(xlDown).Select
ActiveCell.Offset(rowOffset:=1, columnOffset:=0).Select
ActiveCell = cdbl(txtmonto)

End Sub

--
Regards,
Tom Ogilvy


"MESTRELLA29" wrote in message
...
Thanks

I found a web page that told me step by step how to create the form, And
have already use the following code to take it to the excel but I am

having
problems with the amount, this should go as a number but when the ok

button
runs the macro it takes the amount and put's it as a text, do you know how

to
change the property to number?
Private Sub cmbok_Click()
Application.Goto Reference:="concepto"
Selection.End(xlDown).Select
ActiveCell.Offset(rowOffset:=1, columnOffset:=0).Select
ActiveCell = txtconcepto
Application.Goto Reference:="monto"
Selection.End(xlDown).Select
ActiveCell.Offset(rowOffset:=1, columnOffset:=0).Select
ActiveCell = txtmonto

End Sub
txtconcepto, txtmonto is the text box in the form.

"dominicb" wrote:


Good morning Mestrella29

Creating a userform is easy. Putting the code into it that drives it
is what causes the weeping and gnashing of teeth! To create the form
press alt + f11 from Excel and in the VBE select Insert Userform and
then simply draw the controls you require onto the form. It really is
that easy - but be prepared to put a lot of time into the code behind
it - especially if you're not used to VBA.

To call the form use:

Userform1.Show

and to dismiss it use either:

Userform1.Hide
or
Unload Userform1

HTH

DominicB


--
dominicb
------------------------------------------------------------------------
dominicb's Profile:

http://www.excelforum.com/member.php...o&userid=18932
View this thread:

http://www.excelforum.com/showthread...hreadid=375100