Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Passing Controls on a form between modules

I need two forms, one for creating a record, one for updating it.
As all the validation etc will be identical, I thought it would be better to
put the code into one module. Then I could access the code from each form.
The forms have some check boxes on them, which are only visibly if there is a
Bank Hol that week. However I am having trouble accessing them from my
'General' module.
On form...
General.ChangeDays datevalue, frmUpd.Controls
In General...
Sub ChangeDays(day1 As Date, frm As Controls)
I want to say something like...
frm.lblLieu.Visible = True
but I get error 438
Object doesn't support this method or property,
So how do I do this
TIA

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 66
Default Passing Controls on a form between modules

Hi
I've found I can use
On form...
General.ChangeDays datevalue, frmUpd
In General...
Sub ChangeDays(day1 As Date, frm As UserForm)


Don't know I missed that!

"Graham Y" wrote:

I need two forms, one for creating a record, one for updating it.
As all the validation etc will be identical, I thought it would be better to
put the code into one module. Then I could access the code from each form.
The forms have some check boxes on them, which are only visibly if there is a
Bank Hol that week. However I am having trouble accessing them from my
'General' module.
On form...
General.ChangeDays datevalue, frmUpd.Controls
In General...
Sub ChangeDays(day1 As Date, frm As Controls)
I want to say something like...
frm.lblLieu.Visible = True
but I get error 438
Object doesn't support this method or property,
So how do I do this
TIA

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
Passing Variables within For loops to other modules tomjermy Excel Programming 1 August 22nd 06 06:07 PM
VBA & User Form modules vanish Pete[_27_] Excel Programming 6 July 10th 06 03:16 AM
ActiveX Controls vs Form Controls Alex Excel Discussion (Misc queries) 1 January 11th 06 08:46 AM
declaring Arrays to use in a Form with few modules coco Excel Programming 3 July 18th 05 02:46 PM
passing control value from one form to another form mark kubicki Excel Programming 1 April 3rd 04 01:27 AM


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