An Update
I did change the names of the buttons to just the cmdDelete1 and cmdDelete2..... and it worked but the poor buttons do not have a real name. I am assuming that the variable needs to be a string. I changed the integer to a string but that did not work.
Jim Wagner
On Tuesday, November 5, 2013 7:25 AM, "luvmymelody@yahoo.com" <luvmymelody@yahoo.com> wrote:
Hello all,
I am struggling with a vba question.
I have a form that has multiple buttons that are hidden by default. With the click of a button the buttons are made visible. There are 21 of them. I have learned about For Next and declaring a variable, but I am trying to take it a step further. Currently I have the code to list every button name and the visible property to true when the user clicks the main button. But I see that listing every button name is a lot of typing. For aesthetics I have the button and a smaller button with an arrow on it next to it. The smaller buttons have a name of cmdArrowDelete1 down to 21.
The code right now is below and it works great. But I would like to add the other buttons to the code. I have the names with names such as cmdDelete1Accounts and cmdDelete2Accruals.
How can I add the buttons to the For next so they will appear like the other buttons?
Thank You
Jim Wagner
Dim i As Integer
For i = 1 To 21
Me("cmdArrowDelete" & i).Visible = True
Next
__._,_.___
Reply via web post | Reply to sender | Reply to group | Start a New Topic | Messages in this topic (2) |
.
__,_._,___
Tidak ada komentar:
Posting Komentar