Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Clear content of textbox in userform

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Clear content of textbox in userform

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Clear Content except for Formulas Filo Excel Programming 3 May 1st 07 12:29 AM
content on textbox within userform sverre Excel Programming 2 August 22nd 06 07:47 AM
Clear an XML Map of all content DangerMouse[_3_] Excel Programming 1 June 23rd 06 02:43 PM
Clear the content of a worksheet using VBA Shawshank Excel Programming 3 January 13th 04 03:47 PM
UserForm TextBox to ActiveSheet TextBox over 256 characters Dan E[_2_] Excel Programming 1 July 28th 03 07:36 PM


All times are GMT +1. The time now is 02:51 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"