Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have created as user forms, When user enter a text in user forms, that
should appear in Excel work sheet say for Eg: Cell A1 Can you please add codes to this: Sub GetDataFromUser() Dim strUserInput As String strUserInput = InputBox("Please enter your name.", "Name") MsgBox "Your name is " & strUserInput Call GetAddress(strUserInput) End Sub Sub GetAddress(ByVal UserName As String) Dim strAddress As String strAddress = InputBox("Hi, " & UserName & ". What is your address", "Address") MsgBox UserName & " lives at " & strAddress End Sub Regards, Vishu |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You didn't specify exactly how you wanted the data to appear, and the
cell's format will be important but I'm sure you can modify the following: Sub GetDataFromUser() Dim strUserInput As String strUserInput = InputBox("Please enter your name.", "Name") MsgBox "Your name is " & strUserInput Call GetAddress(strUserInput) End Sub Sub GetAddress(ByVal UserName As String) Dim strAddress As String strAddress = InputBox("Hi, " & UserName & ". What is your address", "Address") MsgBox UserName & " lives at " & strAddress End Sub Sub PutItInTheCell(ByVal straddress, username As String) Range("A1").Value = "Name: " & username & Chr(10) & "Address: " & straddress End Sub |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sorry - you should add the line:
Call PutItInTheCell(straddress, username) before the 'End Sub' of GetAddress() |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How can print A Id badge From a Excell Work Sheet | Excel Worksheet Functions | |||
how do i use symbol of degree in excell work sheet using key board | Excel Worksheet Functions | |||
how to delete the little red arrow in excell work sheet block | Excel Worksheet Functions | |||
How do I email one sheet from within an excell work book file | Excel Worksheet Functions | |||
Excell work sheet | Excel Programming |