Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello!
I would like to clear the content of single textboxes of my userform. To clear all content I use a commandbutton which works fine. When I select a specific textbox and press the delete key the textbox looks empty. Then I click the button "save changes" using the code below but the change is not saved to my table. When I change values the change will be saved to the table. Private Sub cmd_save_Click () ActiveCell.Offset(0, 47) = CDbl(txt_fwdEUR) ActiveCell.Offset(0, 48) = CDbl(txt_janEUR) ActiveCell.Offset(0, 49) = CDbl(txt_febEUR) ActiveCell.Offset(0, 50) = CDbl(txt_marEUR) ActiveCell.Offset(0, 51) = CDbl(txt_aprEUR) ActiveCell.Offset(0, 52) = CDbl(txt_mayEUR) ActiveCell.Offset(0, 53) = CDbl(txt_junEUR) ActiveCell.Offset(0, 54) = CDbl(txt_julEUR) ActiveCell.Offset(0, 55) = CDbl(txt_augEUR) ActiveCell.Offset(0, 56) = CDbl(txt_sepEUR) ActiveCell.Offset(0, 57) = CDbl(txt_octEUR) ActiveCell.Offset(0, 58) = CDbl(txt_novEUR) ActiveCell.Offset(0, 59) = CDbl(txt_decEUR) End Sub How can I solve it? Best regards, Bodo Frost |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
cdbl("")
raises an error for me [type mismatch]. Perhaps you are suppressing the error and don't realize it has occured (and prevented the update). -- Regards, Tom Ogilvy "Bikash" wrote: Hello! I would like to clear the content of single textboxes of my userform. To clear all content I use a commandbutton which works fine. When I select a specific textbox and press the delete key the textbox looks empty. Then I click the button "save changes" using the code below but the change is not saved to my table. When I change values the change will be saved to the table. Private Sub cmd_save_Click () ActiveCell.Offset(0, 47) = CDbl(txt_fwdEUR) ActiveCell.Offset(0, 48) = CDbl(txt_janEUR) ActiveCell.Offset(0, 49) = CDbl(txt_febEUR) ActiveCell.Offset(0, 50) = CDbl(txt_marEUR) ActiveCell.Offset(0, 51) = CDbl(txt_aprEUR) ActiveCell.Offset(0, 52) = CDbl(txt_mayEUR) ActiveCell.Offset(0, 53) = CDbl(txt_junEUR) ActiveCell.Offset(0, 54) = CDbl(txt_julEUR) ActiveCell.Offset(0, 55) = CDbl(txt_augEUR) ActiveCell.Offset(0, 56) = CDbl(txt_sepEUR) ActiveCell.Offset(0, 57) = CDbl(txt_octEUR) ActiveCell.Offset(0, 58) = CDbl(txt_novEUR) ActiveCell.Offset(0, 59) = CDbl(txt_decEUR) End Sub How can I solve it? Best regards, Bodo Frost |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Clear Content except for Formulas | Excel Programming | |||
content on textbox within userform | Excel Programming | |||
Clear an XML Map of all content | Excel Programming | |||
Clear the content of a worksheet using VBA | Excel Programming | |||
UserForm TextBox to ActiveSheet TextBox over 256 characters | Excel Programming |