Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Button in a field?

Status
Not open for further replies.

Mitsu

Programmer
Sep 23, 1998
22
US
Hi All,

I have a button with a macro assigned to it so that when it is pressed it will add the date to a field. That part is working.....

but it places the date in the selected field even if it is different than the one with the button in it. What I want to do is have the date appear in the field that has the button that was pressed, even if another cell was already selected ahead of time. that is my Quest!


Thanks in advance,

Mitsu
 
"QUEST"? kinda dramatic!? This is kinda confusing, do have sample code / more details I don't think this sounds like a difficult problem...
 
Determine the name of the field you want the date to go into and:

sub mybutton_onclick()
intendedfield.text = Date
end sub

if the intended field is a label, you'll need intendedfield.caption = date
 
Thank you for your help,
I will try that.

Kylua: does that mean that if I have more that one button, I would need seperate macros, Because I have lots of buttons in each sheet that need to do the same thing for their respective "date" field?

Thanks, again
Mitsu
 
To the best of my knowledge, yes.

If you can set up one macro used by every button, it may be possible to transfer focus to the next tabordered field from the button and add the date to that.

But that's just a thought.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top