Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Setting value of a public var from a form

I need to pass the value entered on a form to a variable
in a module, have tried severial times and no joy. The
variable in the module I am trying to set is public, the
form item is a textbox. I am using the on exit event.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Setting value of a public var from a form

Doesn't

myVar = Textbox1.Text

not work?

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Dave D" wrote in message
...
I need to pass the value entered on a form to a variable
in a module, have tried severial times and no joy. The
variable in the module I am trying to set is public, the
form item is a textbox. I am using the on exit event.



  #3   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Setting value of a public var from a form

No it does not, I have tried from the form ti set the
value and from the module to set the value. Could it be
the "private" declaration of the event?
-----Original Message-----
Doesn't

myVar = Textbox1.Text

not work?

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Dave D" wrote in

message
...
I need to pass the value entered on a form to a

variable
in a module, have tried severial times and no joy. The
variable in the module I am trying to set is public,

the
form item is a textbox. I am using the on exit event.



.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Setting value of a public var from a form

The variable should be declared Public at the top of the general module,
before any procedures and not within a procedure and not in the code module
associated with the form.

--

Regards,
Tom Ogilvy

wrote in message
...
No it does not, I have tried from the form ti set the
value and from the module to set the value. Could it be
the "private" declaration of the event?
-----Original Message-----
Doesn't

myVar = Textbox1.Text

not work?

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Dave D" wrote in

message
...
I need to pass the value entered on a form to a

variable
in a module, have tried severial times and no joy. The
variable in the module I am trying to set is public,

the
form item is a textbox. I am using the on exit event.



.



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Setting value of a public var from a form

Doing it from a form should be no problem as long as the variable is in a
standard code module.

Doing it from the module would need

myVar = Userform1.Textbox1.Text

and the form must not have been unloaded.


--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

wrote in message
...
No it does not, I have tried from the form ti set the
value and from the module to set the value. Could it be
the "private" declaration of the event?
-----Original Message-----
Doesn't

myVar = Textbox1.Text

not work?

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Dave D" wrote in

message
...
I need to pass the value entered on a form to a

variable
in a module, have tried severial times and no joy. The
variable in the module I am trying to set is public,

the
form item is a textbox. I am using the on exit event.



.



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
Setting up a form srod Excel Discussion (Misc queries) 1 March 27th 09 06:02 PM
How do I setup a kiosk type form for public entry? heal my pc! Excel Worksheet Functions 1 October 30th 08 07:26 PM
Setting up a Form Brenda from Michigan Excel Discussion (Misc queries) 1 September 29th 08 03:37 PM
Setting up MS Excel form fbenson Excel Worksheet Functions 1 January 8th 07 01:04 AM
InitializeComponent() errors, Setting values in another form Jeff Morhous Excel Programming 1 February 9th 04 12:13 PM


All times are GMT +1. The time now is 06:14 AM.

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

About Us

"It's about Microsoft Excel"