LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 66
Default Textbox in Userform not recognised by Module

Hi

I'm having trouble getting my Module procedures recognising the values from a Userform

A simple example is where I have a Userform with a textbox ("txtTest") and a command button ("cmdRun"). The code for cmdRun is as follows

----------------------------------
Private Sub cmdRun_Click(

Call MyMacr

End Su
----------------------------------

The MyMacro procedure resides in a standard code module, as follows

----------------------------------
Sub MyMacro(

Dim strTest as Strin

strTest=txtTest.Valu

End Su
----------------------------------

However, when I run this, I get an error "Object Required", i.e. the MyMacro is not recognising the textbox on the userform

Could someone please help

Thanks heaps

SuperJas.
 
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 to pass values from a userform to a standard module? TBA[_2_] Excel Programming 3 January 7th 04 01:50 PM
Passing variables from module to userform Chris Dunigan Excel Programming 4 November 26th 03 09:37 AM
UserForm TextBox to ActiveSheet TextBox over 256 characters Dan E[_2_] Excel Programming 1 July 28th 03 07:36 PM
Userform with template class module problem Tom Ogilvy Excel Programming 0 July 17th 03 06:38 PM
Delete userform/module using VB Rohit Thomas Excel Programming 5 July 16th 03 11:01 PM


All times are GMT +1. The time now is 09:57 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"