xorpej 0 Newbie Poster

hi everyone! Got some problem here. I really need help.

I'm trying to have a shortcut key for my button, w/c has a random text. So, using the access key "&" wont work for me. Here's the original code:

Button1.Text = Mid(ChoosenWord, PickedSeq(0), 1)
  
      Button2.Text = Mid(ChoosenWord, PickedSeq(1), 1)
  
      Button3.Text = Mid(ChoosenWord, PickedSeq(2), 1)
   
      Button4.Text = Mid(ChoosenWord, PickedSeq(3), 1)
  
      Button5.Text = Mid(ChoosenWord, PickedSeq(4),

I tried experimenting to get what I want, but unluckily, I didn't get it. In the original code, the text of my buttons comes from a random character, from a random word. So I don't know what character is being generated. And here's what i did:

Button1.Text = "&" & Mid(ChoosenWord, PickedSeq(0), 1)
  
      Button2.Text = "&" & Mid(ChoosenWord, PickedSeq(1), 1)
 
      Button3.Text = "&" & Mid(ChoosenWord, PickedSeq(2), 1)
   
      Button4.Text = "&" & Mid(ChoosenWord, PickedSeq(3), 1)
  
      Button5.Text = "&" & Mid(ChoosenWord, PickedSeq(4), 1)

I can say it partially worked. Why? Because I can know use the keyboard instead of clicking it w/ the mouse, but the ampersand sign "&" also displays. I tried putting the character first on a variable.

Word = "&" & Mid(ChoosenWord, PickedSeq(0), 1)
Button1.Text=word

But still the ampersand sign "&" also displays.

Please, help me. I really need to finish this project ASAP. Thanks.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.