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: 19
Default userform variables

Hi there hope some one can point me in the right direction. i dont seem to
be able to see the wood for the trees.

I have a userform that I use to collect input from users, i also populate it
from a data source. i use a list of field names that relate to both the range
names on a worksheet and with a prefix of "UF" to the userform both in terms
of controls and variables. I loop through the list and with the controls i
use Range(field) = .Controls(form).Value. how do i deal with the variables
"AdmissionDate", "DateTimeStamp" which in the code for the userform are
prefixed by "UF"
ie how do i pass the values to the relevant range

please see following code

Public Sub datatransfer()
With Workbooks("Cram")
.Activate
With Worksheets("info")
'cram is userform
With Cram
For Each field In Range("datalabels")
form = "UF" & field
Select Case field
Case "AdmissionDate", "DateTimeStamp"

'What do i use here?

Case Else
Range(field) = .Controls(form).Value
End Select
Next
End With

End With
End With
End Sub

many thanks in anticipation

--
Message posted via http://www.officekb.com

 
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
Userform and variables Jeff Excel Discussion (Misc queries) 1 May 24th 06 02:20 PM
How to get get variables to move from userform to main sub? Chet Excel Programming 1 May 10th 06 11:14 PM
Userform.Lable Variables Roger Excel Programming 6 October 9th 05 10:27 PM
Passing variables between Sub and Userform jose luis Excel Programming 8 July 22nd 05 05:20 PM
Passing variables from module to userform Chris Dunigan Excel Programming 4 November 26th 03 09:37 AM


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