LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Spinbutton Mysteriously Erases Textbox

I'm writing an employment evaluation. I have several userforms with
textbox1 and textbox2. textbox1 is a value between 0 and 3 controlled
by a spinbutton (spinbutton1), the only spinbutton on the userform.
textbox2 is a plain text entry box used for comment entry. The issue
I'm having is that if I type my comments in textbox2 first then click
either the up or down buttons on the spinbutton, textbox2 is erased.
What's strange is that if I click the spinbutton first, giving the
employee a rating, and then type in textbox2, and then go back and
click on the spinbutton, the text remains in textbox2. Essentially you
must give a rating first or you will lose any text you enter. I don't
have any code that should erase textbox2 for any reason. Both
textboxes are linked to separate cells on the same sheet. Below is the
code for the spinbutton which is the only code behind the userform.
Thanks for any advice!



Private Sub SpinButton1_SpinDown()
Sheets("calc").Select
For Each cell In ActiveSheet.Range("C57")
If TextBox1.Value 0 Then cell.Value = cell.Value - 0.1
Next
End Sub

Private Sub SpinButton1_SpinUp()
Sheets("calc").Select
For Each cell In ActiveSheet.Range("C57")
If TextBox1.Value < 3 Then cell.Value = cell.Value + 0.1
Next
End Sub

 
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
SpinButton/TextBox - Large Number John Fuller Excel Programming 3 September 21st 06 03:19 PM
Trendline erases chart name jase Charts and Charting in Excel 1 June 21st 06 11:30 PM
Excel erases the "To:" field when emailing Mike M. Excel Discussion (Misc queries) 2 September 26th 05 01:24 PM
Clicking the text in a textbox erases all the data in the box dok112[_20_] Excel Programming 4 July 27th 04 01:26 PM
Spinbutton Linked to Textbox David Reid[_2_] Excel Programming 2 August 19th 03 04:25 PM


All times are GMT +1. The time now is 05:49 AM.

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

About Us

"It's about Microsoft Excel"