Results 1 to 5 of 5

Thread: Simple Question Probably

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2000
    Posts
    352

    Arrow

    I am trying to add ascii code to a string. For instance: something would be a string. something = something + ascii for 120. How would I do that? If the question is phrased confusingly, please say.

    Thanks joe

  2. #2
    Guest
    Code:
    Private Sub Command1_Click()
    
    Dim MyStr As String
    
      MyStr = "hello "
      MyStr = MyStr & Asc(120)
    
      MsgBox MyStr
    
    End Sub

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2000
    Posts
    352

    Smile

    thanx a bunch, i thought it was something like that.

    Forever in your debt,
    joe






    well maybe not forever....

  4. #4
    Guest
    Asc() converts a character to the ASCII value. If you want to convert 120 to a character, use the Chr() function.

    Code:
    MyString = MyString + Chr(120)

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2000
    Posts
    352
    thanx megatron the guru is right as usual. I am afraid asc() does not work. Thanks megatron

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width