xyxex (TechnicalUser) 19 Mar 09 7:51
I have a piece of code that checks a value entered in a textbox is numeric.
Private Sub txtTargetInc_Change()
If HasNumber(txtTargetInc) = True Or txtTargetInc = "" Then GoTo OUT
numerror
OUT:
End Sub
I want to re-use this code for all numeric fields by...
Have tried your suggestions but I am getting an "object" Required error "424".
Appearing here "errchk(txttargetinc)"
Private Sub txtTargetInc_Exit(ByVal Cancel As MSForms.ReturnBoolean)
ErrChk (txtTargetInc)
If txtTargetInc = "" Then GoTo oUT
Range("expprem7").Value = Range("expprem").Value *...
I have a piece of code that checks a value entered in a textbox is numeric.
Private Sub txtTargetInc_Change()
If HasNumber(txtTargetInc) = True Or txtTargetInc = "" Then GoTo OUT
numerror
OUT:
End Sub
I want to re-use this code for all numeric fields by bringing the control name into the...
The Control is a textbox. each one is named "txtrate" + number eg ""txtrate2"
They are on a userform named "ufCovedet"
They are populated by referencing a shreadheet name "data" with Range named "rate" + number "a" eg "rate2a"
I want to populate via a loop "txtRate2" from data held in Range...
The problem seems to stem from VBA's requirement that named ranges must be referred to in quotes("").
I am guessing it is something to do with "DIM as" If I Dim as Range newtext2 retuns as =0, if i Dim as String newtext2 returns as "data!rate2a" but Range wont accept as valid.
FYI...
I am trying to write a loop that will populate a group of named worksheet cells.
my code is
Private Sub Rate_Change()
'update rates when one is changed
Dim i, Text As String, newtext As String, Text2 As String, NewText2 As String, h
Text = "txtrate"
Text2 = "data!rate"...
I have a number of textboxes on a user for that I need to perform the same action on. I am trying to write a loop that will take a common part of the name and add a numbe to the end. This new text then becomes the textbox name
Private Sub Loop1()
Dim Coretext, Newtext
Coretext = "Textbox"
For i...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.