Assigning edit box to cell in dialog box?


Posted by Robert on August 22, 2000 6:04 PM

How do I assign a cell to an edit box when a dialog box
is run by pressing a button. For instance, I am trying
to have a dialog box that is run when I open a file to
put a date in cell C2 (manually, not today's date). I
put the edit box in the dialog box, but don't know how
to link it to a cell. I know I could create a list of
dates and do a combo box, but would rather not do this.
Thanks in advance again.

Posted by Michael Liu on August 23, 0100 6:34 AM

Do you have other things in that dialog box?
If not, I would suggest using an input box
instead.

Code would look something like:
Range("C2").value = Inputbox("Enter date","Information")

Posted by Robert on August 23, 0100 11:07 AM

That works great, I added this to the auto open
procedure in the workbook, but one more thing
please. How do I word an If statement so that this
input box only comes up if the cell is blank?
Thanks for all the help Michael.


Posted by Robert on August 23, 0100 11:14 AM

Nevermind, figured it out, thanks. That works great, I added this to the auto open


Posted by Michael Liu on August 23, 0100 11:14 AM

Ah, so you only want this box to pop up if C3 is empty?

In that case you could write:
If Isempty(Range("C2")) then Range("C2").value = Inputbox("Enter date","Information") That works great, I added this to the auto open




Posted by M on August 23, 0100 11:15 AM

I meant C2, but I'm sure you figured that out. =)