To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here
VBForums  

VB Wire News
Part 10 of the Visual Basic .NET 2010 Express Tutorial Complete!
How to Use the Visual Studio Code Analysis Tool FxCop
Article :: Interview with Andrei Alexandrescu (Part 3 of 3)
Introducing Visual Studio LightSwitch
Visual Studio LightSwitch Beta 1 is Available



Go Back   VBForums > Visual Basic > Visual Basic 6 and Earlier

Reply Post New Thread
 
Thread Tools Display Modes
Old Apr 22nd, 2007, 10:33 PM   #1
BefunMunkToloGen
Lively Member
 
Join Date: Feb 05
Posts: 107
BefunMunkToloGen is an unknown quantity at this point (<10)
Resolved [RESOLVED] Arghh...

Please download this project. It's only a few lines but it's giving me a headache.

Instead of going "12 34 56" it's going "12 23 34". Please help, and thanks.
Attached Files
File Type: zip InpChr.zip (1.3 KB, 8 views)
BefunMunkToloGen is offline   Reply With Quote
Old Apr 22nd, 2007, 11:01 PM   #2
iPrank
PoorPoster
 
iPrank's Avatar
 
Join Date: Oct 05
Location: in an island
Posts: 2,658
iPrank is a glorious beacon of light (400+)iPrank is a glorious beacon of light (400+)iPrank is a glorious beacon of light (400+)iPrank is a glorious beacon of light (400+)iPrank is a glorious beacon of light (400+)
Re: Arghh...

Problems:
1. You don't have Option Explicit
2. You need to increase the loop counter by 2
3. Don't use + for concatening strings. Use the & operator.
4. What is your goal ? Do you want to find ASCII values of individual digits ?
5. Please give meaningful thread title. Thanks.

vb Code:
  1. Option Explicit
  2. Private Sub Command1_Click()
  3.     Dim ToConvert As String
  4.     ToConvert = Text1.Text
  5.     Text2.Text = String_Chr$(ToConvert)
  6. End Sub
  7. Function String_Chr$(ByVal inString$)
  8.     Dim lenString As Long
  9.     Dim tmpString As String
  10.     For lenString = 1 To Len(inString) Step 2
  11.         tmpString = tmpString & "Chr$(""&H" & CStr(Mid$(inString, lenString, 2)) & """) & "
  12.     Next
  13.     String_Chr = Left$(tmpString, Len(tmpString) - 3)
  14. End Function
__________________
Usefull VBF Threads/Posts I Found . My flickr page .
"I love being married. It's so great to find that one special person you want to annoy for the rest of your life." - Rita Rudner

iPrank is offline   Reply With Quote
Old Apr 22nd, 2007, 11:06 PM   #3
dclamp
Terrible Member
 
dclamp's Avatar
 
Join Date: Aug 06
Location: United States
Posts: 2,862
dclamp has a spectacular aura about (150+)dclamp has a spectacular aura about (150+)
Re: Arghh...

6. Most people wont download code, you should post it with the syntax highlighting
dclamp is offline   Reply With Quote
Old Apr 22nd, 2007, 11:16 PM   #4
BefunMunkToloGen
Lively Member
 
Join Date: Feb 05
Posts: 107
BefunMunkToloGen is an unknown quantity at this point (<10)
Re: Arghh...

Thanks. That worked.

I apologise for the failure of a thread... Very late and tired. Solved, thanks again
BefunMunkToloGen is offline   Reply With Quote
Old Apr 22nd, 2007, 11:18 PM   #5
dclamp
Terrible Member
 
dclamp's Avatar
 
Join Date: Aug 06
Location: United States
Posts: 2,862
dclamp has a spectacular aura about (150+)dclamp has a spectacular aura about (150+)
Re: [RESOLVED] Arghh...

hey no problem. and thanks for the rep
dclamp is offline   Reply With Quote
Reply

Go Back   VBForums > Visual Basic > Visual Basic 6 and Earlier


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 05:33 AM.





Acceptable Use Policy

Internet.com
The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.