Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default How to show messge box text in Excell work sheet

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 107
Default How to show messge box text in Excell work sheet

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 107
Default How to show messge box text in Excell work sheet

Sorry - you should add the line:

Call PutItInTheCell(straddress, username)

before the 'End Sub' of GetAddress()

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can print A Id badge From a Excell Work Sheet sbaby Excel Worksheet Functions 3 December 12th 09 10:32 PM
how do i use symbol of degree in excell work sheet using key board amitwills Excel Worksheet Functions 2 August 5th 08 05:14 AM
how to delete the little red arrow in excell work sheet block earledawg Excel Worksheet Functions 1 May 29th 08 02:09 PM
How do I email one sheet from within an excell work book file Marguerite Excel Worksheet Functions 1 April 29th 08 05:06 PM
Excell work sheet alvis Excel Programming 1 November 4th 04 09:06 AM


All times are GMT +1. The time now is 10:11 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"