Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Limits on Userform textbox

Hi Guys,
I am somewhat new to advanced VBA but trying real hard. One concep
that is the hardest for me to understand and rectify is error trapping
I am trying to make a Userform to change a Spreadsheet cell an
display the change in a "textbox" that I can also just type in
number. The code I have come up with from Excel help is below. I
works ok until I try to edit the textbox with a number greater than th
limit of the scrollbar. Can anyone help me? Also, If anyone can giv
me a simplified explanation of what exactly the three scrollba
commands are doing that would be great!

I've attached the file for easy editing.

Thanks,
Russ

Public Azimuth As Integer

Private Sub cmdContinue_Click()
Unload Me
End Sub

Private Sub txtAzimuth_Change()
scrAzimuth.Value = txtAzimuth.Value
End Sub

Private Sub UserForm_Initialize()
scrAzimuth.Min = 0
scrAzimuth.Max = 360
scrAzimuth.Value = 180
End Sub

Private Sub scrAzimuth_Change()
txtAzimuth.Value = (scrollsaved + scrAzimuth.Value)
Range("b2") = txtAzimuth.Value
End Sub

Private Sub scrAzimuth_Exit(ByVal Cancel As MSForms.ReturnBoolean)
txtAzimuth.Value = (scrollsaved + scrAzimuth.Value)
scrollsaved = scrAzimuth.Value
End Sub

Private Sub scrAzimuth_Scroll()
txtAzimuth.Value = (scrollsaved + scrAzimuth.Value)
End Su

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Limits on Userform textbox

This seems to be an example whereby the scrollbar is used to set the textbox
value. Slide it up or down and the textbox changes.

It seems totally unnecessary for your app, get rid of it and the three
events.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"radarguy " wrote in message
...
Hi Guys,
I am somewhat new to advanced VBA but trying real hard. One concept
that is the hardest for me to understand and rectify is error trapping.
I am trying to make a Userform to change a Spreadsheet cell and
display the change in a "textbox" that I can also just type in a
number. The code I have come up with from Excel help is below. It
works ok until I try to edit the textbox with a number greater than the
limit of the scrollbar. Can anyone help me? Also, If anyone can give
me a simplified explanation of what exactly the three scrollbar
commands are doing that would be great!

I've attached the file for easy editing.

Thanks,
Russ

Public Azimuth As Integer

Private Sub cmdContinue_Click()
Unload Me
End Sub

Private Sub txtAzimuth_Change()
scrAzimuth.Value = txtAzimuth.Value
End Sub

Private Sub UserForm_Initialize()
scrAzimuth.Min = 0
scrAzimuth.Max = 360
scrAzimuth.Value = 180
End Sub

Private Sub scrAzimuth_Change()
txtAzimuth.Value = (scrollsaved + scrAzimuth.Value)
Range("b2") = txtAzimuth.Value
End Sub

Private Sub scrAzimuth_Exit(ByVal Cancel As MSForms.ReturnBoolean)
txtAzimuth.Value = (scrollsaved + scrAzimuth.Value)
scrollsaved = scrAzimuth.Value
End Sub

Private Sub scrAzimuth_Scroll()
txtAzimuth.Value = (scrollsaved + scrAzimuth.Value)
End Sub


---
Message posted from http://www.ExcelForum.com/



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
userform textbox Phil Excel Worksheet Functions 5 January 16th 05 06:59 PM
Textbox in userform shaharul[_6_] Excel Programming 3 April 15th 04 12:54 PM
Userform ComboBox and TextBox help!!! Pete Excel Programming 1 February 13th 04 09:13 PM
hide a textbox on a userform? Bill Lunney Excel Programming 2 July 31st 03 08:57 AM
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 12:15 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"