eliminating command button from userform with empty relative cells

Amin Kaveh

New Member
Joined
Jan 17, 2019
Messages
18
Hi there!
I have some problem and I will wonder if you help me on this.
I have a calendar with 12 command buttons with name month_1, month_2 , ... ,month_12 and almost 365 command buttons with name day_1_1, day_1_2, ... ,day_12_29 and also 365 cells in a separate worksheet relative to this command buttons with name like calendar /01/01, /01/02, ... /12/29.

What I want is the elimination of command button when relative cell is empty.
I will appreciate answering this question.
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Hi there!
I have some problem and I will wonder if you help me on this.
I have a calendar with 12 command buttons with names month_1, month_2 , ... ,month_12 and almost 365 command buttons with names day_1_1, day_1_2, ... ,day_12_29 and also 365 cells in a separate worksheet relative to these command buttons with names like calendar /01/01, /01/02, ... /12/29.

What I want is the elimination of command button when relative cell is empty.
I will appreciate answering this question
 
Upvote 0
Rather than removing the buttons, it is easier to hide the ones you don't need.

How does one know which cell is associated with which command button?
 
Last edited:
Upvote 0
yes, I mean to hide the command buttons.
The cell value 01/01 is relative to command button day_1_1 and cell value 01/02 is relative to day_1_2 and .....
 
Upvote 0
I never believe it's a good plan to have large numbers of command buttons or other controls to perform a task.

We can write you scripts that would be activated when you double click on a cell.
Doing things this way requires very little code and no need for 365 buttons.

Please explain your ultimate Goal.

Like if the current Date is 8/29/19 enter "Hello" in Sheet("Alpha") Range("A45")

Or why not select the Month from a Combobox.
 
Upvote 0

Forum statistics

Threads
1,214,833
Messages
6,121,864
Members
449,052
Latest member
Fuddy_Duddy

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