Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Tried that and got error 424 object required........
Admissiondata is a value of a list called datalables it is also a range callled admissiondate it is also a variable within the code of userform "cram" when "UF" is a prefifix (ie UFADmissionDate) UFadmissionDate will contain a date derived on the userform using thre test boxes for dd, mm and yy these are put together for the date. UFAdmissionDate is publically delacred as a date globally JLGWhiz wrote: You probably want to change : From: form = "UF" & field To: form = "UF" & field.Value You should also Dim field As Range at the beginning of your macro. Then, the syntax for the code that I gave you should work. Let's say that the worksheet cell C5 is in Range("Data Labels") and is named Admission Date with a value of "357". When the For...Next loop hits that cell, it triggers the Case and the value of "form" is now = UF357. You can make any cell on any sheet equal form and UF357 will appear in that cell. I am not sure that Admission Date is a cell name or range name but I assume that it is one or the other by the way it is used. I do not see it in the variables declarations because there were none posted. thanks for your input, [quoted text clipped - 13 lines] many thanks in anticipation -- Message posted via http://www.officekb.com |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Userform and variables | Excel Discussion (Misc queries) | |||
How to get get variables to move from userform to main sub? | Excel Programming | |||
Userform.Lable Variables | Excel Programming | |||
Passing variables between Sub and Userform | Excel Programming | |||
Passing variables from module to userform | Excel Programming |