Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Form 2 Form data transfer
Hi all,
I need help I have made a form where u input data that on closing is transfered to a worksheet eg: Range("d3").Value = Membernumber.Value on this form I have placed a button that unhides another form for optional info. I want to transfer this info to some hidden text boxes so that on closing the main form all data is transfered to the worksheet. I have used this code on closing the second form but it doesn't work. UserForm1!advisername.Value = advisername.Value UserForm1!apptdate.Value = Appt_date.Value UserForm2.Hide THanks in advance Mark |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Form 2 Form data transfer
Use
Unload UserForm2 to get rid of it. DM Unseen |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Form 2 Form data transfer
Sorry , I was unclear...
The problem isn't hiding the form... It is transfering the data from one form to the other... UserForm1!advisername.Value = advisername.Value UserForm1!apptdate.Value = Appt_date.Value This is the code that doesn't work. "DM Unseen" wrote: Use Unload UserForm2 to get rid of it. DM Unseen |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Form 2 Form data transfer
mm,
This should be put in the QueryClose event. I would use UserForm1.advisername.Value = advisername.Value UserForm1.apptdate.Value = Appt_date.Value The Exclamation I have never used in XL(but only in Access). BTW if you need hidden info in your Form, you could use property get/Let Property Let MyDate(dt as Date) ' do something here, set it to a variable. End Property or a global variable in your Forms Code (is even easier) Public MyDate as Date Both will work as an extra property of your USerForm1 object and in your subform you can state UserForm1.mydate = dtThisDate DM Unseen |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Form 2 Form data transfer
Ahh silly me , thanks.
I've done most of my programming in access... removing the ! should work. ta again Mark "DM Unseen" wrote: mm, This should be put in the QueryClose event. I would use UserForm1.advisername.Value = advisername.Value UserForm1.apptdate.Value = Appt_date.Value The Exclamation I have never used in XL(but only in Access). BTW if you need hidden info in your Form, you could use property get/Let Property Let MyDate(dt as Date) ' do something here, set it to a variable. End Property or a global variable in your Forms Code (is even easier) Public MyDate as Date Both will work as an extra property of your USerForm1 object and in your subform you can state UserForm1.mydate = dtThisDate DM Unseen |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Formula (off form) that completes form data based on a result | Excel Worksheet Functions | |||
excel form. Need data extracted to spreadsheet each time a form co | Excel Discussion (Misc queries) | |||
transfer data from excel form to a spreadsheet | Excel Discussion (Misc queries) | |||
How to Transfer data from Text Form Fields in MS Word into Excel? | Excel Discussion (Misc queries) | |||
How do you transfer data from an input form in excel to an excel l | Excel Discussion (Misc queries) |