jcsnider Posted December 24, 2010 Author Share Posted December 24, 2010 Alright I have never had a problem like this so I have very little insight on this.In the past if I had a string (str) with a value of "1.4" I could multiply it by lets say a long like i which could equal 2 like this.```dim str as stringdim i as longstr = "1.4"i = 2i = i * str```Now on my computer it will handle it just fine and i will end up equaling 3 which is 2.8 rounded up because it is a long.On some other computers they are not as smart and error out. I have however attempted to use Csng and Clng along with other functions but all without success. Any ideas from you all? Link to comment Share on other sites More sharing options...
Homicidal Monkey Posted December 24, 2010 Share Posted December 24, 2010 try a language besides vb6 Link to comment Share on other sites More sharing options...
evilbunnie Posted December 24, 2010 Share Posted December 24, 2010 @jcsnider:> ```> dim str as string> Dim I As Long> Dim str As String> str = 1.4> I = 2> I = I * str> ``` Link to comment Share on other sites More sharing options...
IceCream Tuesday Posted December 24, 2010 Share Posted December 24, 2010 @Captain:> @jcsnider:> > > ```> > dim str as string> > Dim I As Long> > Dim str As String> > str = 1.4> > I = 2> > I = I * str> > ```What would diming str as two things accomplish? Couldn't you just use val(str) or something like that? Dont remember if that is actually a command.. Link to comment Share on other sites More sharing options...
westin444 Posted December 24, 2010 Share Posted December 24, 2010 I think he is meaning capitalize the String, so not dim str as string, but dim str as String.yeah but just use Val(str as String) Link to comment Share on other sites More sharing options...
Homicidal Monkey Posted December 24, 2010 Share Posted December 24, 2010 @314piwm:> I think he is meaning capitalize the String, so not dim str as string, but dim str as String.> > yeah but just use Val(str as String)vb6 is not case sensitive; it is being dimensionalized twice Link to comment Share on other sites More sharing options...
westin444 Posted December 24, 2010 Share Posted December 24, 2010 ah well thats the only reason I could think of. And I've been using Java more than anything else. Link to comment Share on other sites More sharing options...
Robin Posted December 24, 2010 Share Posted December 24, 2010 @Captain:> @jcsnider:> > > ```> > dim str as string> > Dim I As Long> > Dim str As String> > str = 1.4> > I = 2> > I = I * str> > ```![](http://i38.photobucket.com/albums/e112/Kite_Minase/Reaction/MaoNeechan_Facepalm.jpg) Link to comment Share on other sites More sharing options...
jcsnider Posted December 24, 2010 Author Share Posted December 24, 2010 It was the damn val() and no, that is not the code in which I am actually using, it is a shit load more complicated than that but provided the same error.Thanks to 314piwm. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now