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: 1
Default InputBox vs. UserForm for Numerical Data Input


Thanks everyone -- I apologize for my confusing post, especially th
last paragraph -- I must have been fairly tired.

There is definitely a "handshaking" problem between my main macro an
my Private code. Here is my Private code:

Private Sub grpCUT_OFF_LEVEL_Click()
End Sub
_________________________________________
Private Sub inptCUT_OFF_LEVEL_Change()
Dim MIN, MAX
Dim Str As String
MIN = ActiveCell.Offset(-4, 4).Value * 100
MAX = ActiveCell.Offset(-2, 4).Value * 100

Again:
Str = inptCUT_OFF_LEVEL.Value
Level = Val(Str)
'If Level = False Then Exit Sub
If Level MAX Or Level < MIN Then
MsgBox "Percentage must be between MIN and MAX"
GoTo Again

End If

MsgBox Level
End Sub
________________________________________________
Private Sub UserForm_Click()
End Sub

This is the relevant part of my main code:

frmCUT_OFF_LEVEL.Show
Range("PERCENT").Value = Level

PERCENT is a named cell in my WB.

First, things that are working:
By moving the cursor over the MIN and MAX variables when steppin
thru the Private code, I see the correct numbers. MsgBox Level i
displaying the correct number. That's the end of this list.

Things that are not working:
When the Form pops up, I am not able to input a number (th
Enabled Property is set to 'True'). What I was attempting to explai
in the last paragraph of my preceding post is that I would assign th
Value Property to the string "999"; when the Form popped up, I woul
scrape the rightmost 9 off the string with the BS key, then the macr
would continue stepping thru the Private code with the string "99" i
the text box. Keying the Enter key has zero affect on the text box.
Also, the Form does not 'go away' -- I have to click on the 'X' in th
upper right corner; I tried inserting "Unload Me" in the Private cod
for the Form itself, but that did not help.

Sharad,
I added a new module and inserted 'Public Level As Integer' in
macro by itself. This did not appear to change the above negativ
results.

Thanks again,
Chuckles12

--
Chuckles12
-----------------------------------------------------------------------
Chuckles123's Profile: http://www.excelforum.com/member.php...fo&userid=1494
View this thread: http://www.excelforum.com/showthread.php?threadid=27744

 
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
InputBox vs. UserForm for Numerical Data Input Chuckles123[_51_] Excel Programming 3 November 12th 04 08:37 AM
Userform-allow numerical input? waveracerr[_20_] Excel Programming 2 September 14th 04 08:11 PM
Numerical Input via an inputbox method Tom Ogilvy Excel Programming 0 August 16th 04 07:33 PM
Numerical Input via an inputbox method Bob Phillips[_6_] Excel Programming 0 August 16th 04 07:30 PM
Automatic userform data input into spreadsheet Dan Excel Programming 2 June 11th 04 04:54 PM


All times are GMT +1. The time now is 11: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"