Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default userform textbox to variable

All Excel brains out there,

I am trying to save a textbox value as a variable and then use that
variable in a seperate module. So far everything that I have tried has
not worked, so does any one have any ideas?

Thanks,

Peter

  #2   Report Post  
Posted to microsoft.public.excel.programming
PAR PAR is offline
external usenet poster
 
Posts: 20
Default userform textbox to variable

Peter why not just ask Paul

"Peter" wrote:

All Excel brains out there,

I am trying to save a textbox value as a variable and then use that
variable in a seperate module. So far everything that I have tried has
not worked, so does any one have any ideas?

Thanks,

Peter


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default userform textbox to variable

It is ReturnValue = MyMessagebox.text.

You can also use a MSGBOX. Below is the VBA help suggestions

Text Property
See AlsoApplies ToExampleSpecificsReturns or sets the text for the specified
object. Read-only String for the Range object, read/write String for all
other objects.

For information about using the Text worksheet function in Visual Basic, see
Using Worksheet Functions in Visual Basic.

Remarks
For the Phonetic object, this property returns or sets its phonetic text.
You cannot set this property to Null.

Example
This example sets the text for the chart title of Chart1.

With Charts("Chart1")
.HasTitle = True
.ChartTitle.Text = "First Quarter Sales"
End With

This example sets the axis title text for the category axis in Chart1.

With Charts("Chart1").Axes(xlCategory)
.HasTitle = True
.AxisTitle.Text = "Month"
End With

This example illustrates the difference between the Text and Value
properties of cells that contain formatted numbers.

Set c = Worksheets("Sheet1").Range("B14")
c.Value = 1198.3
c.NumberFormat = "$#,##0_);($#,##0)"
MsgBox c.Value
MsgBox c.Text



"PAR" wrote:

Peter why not just ask Paul

"Peter" wrote:

All Excel brains out there,

I am trying to save a textbox value as a variable and then use that
variable in a seperate module. So far everything that I have tried has
not worked, so does any one have any ideas?

Thanks,

Peter


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
TEXTBOX in USERFORM RUUD VAN DEURSEN Excel Programming 5 March 1st 05 03:36 PM
userform textbox Phil Excel Worksheet Functions 5 January 16th 05 06:59 PM
Textbox in userform Harald Staff Excel Programming 0 September 8th 04 11:51 AM
Textbox in userform shaharul[_6_] Excel Programming 3 April 15th 04 12:54 PM
UserForm TextBox to ActiveSheet TextBox over 256 characters Dan E[_2_] Excel Programming 1 July 28th 03 07:36 PM


All times are GMT +1. The time now is 12:31 AM.

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"