Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 233
Default Form 2 Form data transfer

Use

Unload UserForm2

to get rid of it.

DM Unseen

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 233
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default 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
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
Formula (off form) that completes form data based on a result lldiel Excel Worksheet Functions 2 November 24th 09 11:09 PM
excel form. Need data extracted to spreadsheet each time a form co MikeR-Oz Excel Discussion (Misc queries) 4 April 5th 09 05:18 AM
transfer data from excel form to a spreadsheet Jeff[_11_] Excel Discussion (Misc queries) 0 March 13th 08 05:13 PM
How to Transfer data from Text Form Fields in MS Word into Excel? CWillis Excel Discussion (Misc queries) 1 July 18th 06 06:35 AM
How do you transfer data from an input form in excel to an excel l mdalzell Excel Discussion (Misc queries) 0 April 18th 05 06:10 PM


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