View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ken Puls Ken Puls is offline
external usenet poster
 
Posts: 58
Default Customizing userforms on button clicks

Hi there,

These are buttons inside the userform? The long way to do it would be
calling a function to evaluate what button was clicked. It's a simple
one liner to change the caption in your Button_Click event:

Me.Caption = "MyCustomTitle"

HTH,

Ken Puls, CMA - Microsoft MVP (Excel)
www.excelguru.ca

wrote:
I have a series of buttons all using the same Userform. However, I
would like to be able to personalize the title of the userform -
depending on what button is clicked.

The long way to do it, would be to have a short macro for each button,
that would each generate the userform and accordingly change the
caption details.

But I am assuming there should be a shorter way, to enable a large set
of buttons to use the same userform and be able to personalize the
title as required. Perhaps a series of case statements or even somthing
simpler??