FernandSelangor
New Member
- Joined
- Jul 30, 2014
- Messages
- 1
Dear Gents,
Using this code I am able to send data in cell A10 into .txt file.
How do I to send the data in cell A10 into text box VB6?
If you would test my code
1. Click developer tab button in excel.
2. Click Insert Control and choose Scroll Bar ( Active X control )
3. Right click the Scroll Bar and choose property
4. Set the linkedCell to A10 and set the limit data between 1 to 100
5. Right Click the Scroll Bar and choose view code
6. Copy and Paste my code
7. Make a .txt file in C drive and name it as Text.
8. You are pleased to slide the scroll bar and you will the data in cell A10 is transferred into text.
I would like to do the same thing but this time I would send the data in cell A10 into text box VB6.
Kindly regards.
Using this code I am able to send data in cell A10 into .txt file.
How do I to send the data in cell A10 into text box VB6?
Code:
[COLOR=#333333]Private Sub ScrollBar1_Change()[/COLOR]
<code style="margin: 0px; padding: 0px; font-style: inherit; font-weight: inherit;">Dim Text As StringDim TextFile As String Application.ScreenUpdating = False TextFile = "C:\text.txt" Open TextFile For Output As #1 Text = Worksheets("Sheet 1").Range("A10") Print #1, Text Close #1 </code>[COLOR=#333333]End Sub[/COLOR]
If you would test my code
1. Click developer tab button in excel.
2. Click Insert Control and choose Scroll Bar ( Active X control )
3. Right click the Scroll Bar and choose property
4. Set the linkedCell to A10 and set the limit data between 1 to 100
5. Right Click the Scroll Bar and choose view code
6. Copy and Paste my code
7. Make a .txt file in C drive and name it as Text.
8. You are pleased to slide the scroll bar and you will the data in cell A10 is transferred into text.
I would like to do the same thing but this time I would send the data in cell A10 into text box VB6.
Kindly regards.