View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
RB Smissaert RB Smissaert is offline
external usenet poster
 
Posts: 2,452
Default Simple Form: How to copy a value from one object to another?

Not I understand the problem.
How about simply Textbox1.Text = sFile

RBS


"Dirk Diggler" wrote in message
...
hello everyone,

There is a simple form in Excel: one button, and one textbox. The button
has a CommandButton1_Click() procedure defined as a call to the following
subroutine:

Public Sub ChooseUniverse()
Dim sFile As String

sFile = Application.GetOpenFilename(FileFilter:= _
"TXT Files (*.txt), *.txt", FilterIndex:=1, _
Title:="Choose TXT File...")
End Sub

I tried to figure out if it was possible to pass the sFile value to the
textbox so that after choosing a file its path would be visible in the
textbox, but I failed at looking for some understandable examples.

Does anybody know it is possible and how can be done? I would appreciate
any suggestions or hints, or a link to some tutorial (with Excel).

thank you,
DD

ps. Follow-Up To: microsoft.public.excel.programming