Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I have a Userform 'fMusicSearch' wh 1

Status
Not open for further replies.

awool

Technical User
Nov 7, 2005
10
GB
I have a Userform 'fMusicSearch' which displays in a text box 'txtSong' a song title. I would like to double click the text box which would copy the song title and append it to Column A in worksheet Sheet1. Therefore if there is already data in Column A append it in the next empty cell.

Any help greatly appreciated

Regards
Awool
 
Try this code:

Code:
Option Explicit

Private Sub txtSong_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
Dim intRow As Integer

intRow = 1
Do While Sheet1.Range("A" & intRow).Value <> ""
    intRow = intRow + 1
Loop

Sheet1.Range("A" & intRow).Value = txtSong.Text

End Sub

Have fun.

---- Andy

A bus station is where a bus stops. A train station is where a train stops. On my desk, I have a work station.
 
Perfect THANK YOU VERY MUCH

REGARDS

AWOOL
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top