Thread: Run-time error '13'
04-16-12, 20:04 #1Registered User
- Join Date
- Apr 2012
Unanswered: Run-time error '13'
For months i have been using a little script in my ESRI GIS software and it has been working fine. But unfortunately when I click a button I get the error "Run-time error '13'
Now my problem is I am not very good at debugging, but I am very good at fixing things under instruction. Is there anything that stands out in the below code?
' change US Manhole to lavington datum
Private Sub CommandButton2_Click()
USImperial = TextBox9.Text
USExistCoverted = (USImperial * 0.3048) - 0.238
USExistRound = Format(USExistCoverted, "###.##")
TextBox2.Text = USExistRound
USSL = TextBox11.Text
TextBox11.Text = USSL - 0.238
USSLImperial = TextBox13.Text
USSLExistCoverted = (USSLImperial * 0.3048) - 0.238
USSLExistRound = Format(USSLExistCoverted, "###.##")
TextBox11.Text = USSLExistRound
Any suggestions or comments greatly appreciated.
04-17-12, 03:58 #2Jaded Developer
Provided Answers: 59
- Join Date
- Nov 2004
- out on a limb
at first guess I'm assuming usimperial is a control
in which case you have to explicitly tell VB to use the value or else it tries to multiply the code not the value in the control
so I'd try
USExistCoverted = (USImperial.value * 0.3048) - 0.238
USExistCoverted = (cdbl(textbox9.value) * 0.3048) - 0.238
have a look at isnumericI'd rather be riding on the Tiger 800 or the Norton