Form control- button with updated date.

johannordgren

New Member
Joined
Apr 24, 2018
Messages
31
Hello there,

Need help with a VBA code or a macro for a clickable button.

When the button is clicked I would like "the text in the button" to update the days date.

Thank you!
 
I suppose. I only have one "Sheet". And I open VB from "view code" by right-clicking on the button.
If this is what you mean with "Activesheet".

Yes I thought you may be running the code other than clicking the button which may produce the error you have if sheet button resides is not active.

As already mentioned, right click the button and select assign macro should resolve issue.

Dave
 
Last edited:
Upvote 0

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
If you're willing to take another shot with mine, you can right click the button and use "assign macro" then make sure the Button1_click is actually selected.

For the record, I'm having success with my code and Dave's code (though my 'merican date format doesn't match Dave's) :P

Okey, now this worked tho. I was using an ActiveX button. Maybe that has been the entire problem?

Since I changed to a Form control button now..
 
Upvote 0
Okey, now this worked tho. I was using an ActiveX button. Maybe that has been the entire problem?

Since I changed to a Form control button now..

would have been helpful if mentioned that from outset but no worries so long as resolved.

Dave
 
Upvote 0

Forum statistics

Threads
1,215,026
Messages
6,122,738
Members
449,094
Latest member
dsharae57

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top