Looking for an easier way to change the name of copied controls...

M

Matty Dread

I have a multipage userform which, once completed, will have 5 pages. The
form is being used to calculate multiple quotes, so each individual page will
be identical in structure and function, but give the user the power to change
certain criteria pertinent to that quote. (As if you really needed to know
all that...)

My problem is this: I set up the first page which has several text/combo
boxes in frames and there is a lot of code behind them. My plan (unless
there is someone out there that can help me) is to copy all of the controls
and paste them on the other sheets. What I am not looking forward to (and
perhaps there is no solution and I'm just being lazey) is renaming all of the
controls on the 4 other pages.

So, finally, my question:

Is there a way to change the name of my textboxes & comboboxes with VBA?
I'm pretty new to this and as much as I've learned in the past few months, I
just can't seem to figure this one out. Any help would be GREATLY
appreciated!

Regards,
Matty
 
J

Joel

Why have multi-page user for when you can have a option button and when the
option button is changes fill the userform with different data.

Set MyBox = UserForm1.Controls("listbox1")
 
M

MaddyDread

Hi Joel. Thanks for the quick response.

I would just use option buttons, but I need each quote difference to be
retained and able to be called up again. I also have the information
printing/emailing from my userform, and those need to have all of the
differences listed for our customer.
 
J

Joel

Make a hidden worksheet. Store the data from each quote on the worksheet in
a differnt column. The when you select a different option button save the
current data and retrievve the new data from the hidden worksheet.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top