
November 28th, 2003, 07:26 AM
|
|
Junior Member
|
|
Join Date: Oct 2003
Posts: 3
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
Small parameter window
This is probably an easy one, but I just can't find the trigger to get me going.
I have a listbox, and when the user double-clicks an item, he/she can change the text for that item. I want to do that using a small parameter window: a window with just a text box and an OK and Cancel button. At startup, this textbox should contain the current value.
I have created a small form with the necessary controls, called frmNewName.
And in my main window I have created a function called GetNewName, which currently contains the following:
Code:
Function GetNewName(strOldName As String)
frmNewName.txtNewName = strOldName
frmNewName.Show
'If OK then return the new name
'If Cancel then return the old name
End Function
My question is how to link these two forms together? What piece of code goes in what form? How do I extinguish between the user pressing the OK button and the Cancel button on this parameter form?
|