Excel - Command Button Alignment

Anonymous
2021-07-06T15:28:10+00:00

Hi,

I have been trying to two days to make this worksheet of command (active x) buttons align and look nice. Ideally I would like them to be perfectly aligned and have equal amount of space between each button. Thanks for any help:

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes
Answer accepted by question author
  1. HansV 462.4K Reputation points MVP Volunteer Moderator
    2021-07-07T14:04:15+00:00

    Let's say that you have a worksheet named Clients, with client names in A2:A100 and the corresponding email addresses in B2:B100.

    On the sheet with the single command button, place an ActiveX list box with ListFillRange set to Clients!A2:A100 and LinkedCell set to A1.

    In B1 on that sheet, enter the formula =IFERROR(VLOOKUP(A1,Clients!A2:B100,2,FALSE),"")

    The code behind the single command button can be as shown above, but change the .To = "...." line to

    .To = Range("B1").Value

    This will set the to address to the email address corresponding to the selected client.

    1 person found this answer helpful.
    0 comments No comments

5 additional answers

Sort by: Most helpful
  1. Anonymous
    2021-07-07T14:20:22+00:00

    I love you

    0 comments No comments