View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
SuperJas SuperJas is offline
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.