VB6- Copy a row from excel and paste it in Text2 VB6 issue
Hello all
I'm trying to copy a row from an excel file and paste it in my VB6 project in a Text2 as multiline but i have a hard time with it.
I'm trying this way:
If Text2 <> "" ThenMsgBox "Data already in Textbox"ElseDim varData If Selection.Rows.Count > 1 Then varData = Join(Application.Transpose(Selection.Value), vbCr) ElseIf Selection.Columns.Count > 1 Then varData = Join(Application.Transpose(Application.Transpose(Selection.Value)), vbCr) Else varData = Selection.Value End If With Me.Text2 .Text = varData End With End If
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
Guy Hengel [angelIII / a3]
the runtime error 91 means "object not set" ...
on which line? on which variable?
while stepping through the code, it should become obvious
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
Shouldn't you refer to TextBox2 on line 12
Regards