Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Looking for an easier way to change the name of copied controls...

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Looking for an easier way to change the name of copied controls...

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")



"Matty Dread" wrote:

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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Looking for an easier way to change the name of copied control

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.
--
Matty


"Joel" wrote:

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")



"Matty Dread" wrote:

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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Looking for an easier way to change the name of copied control

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.

"MaddyDread" wrote:

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.
--
Matty


"Joel" wrote:

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")



"Matty Dread" wrote:

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

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Looking for an easier way to change the name of copied control

Joel,

I tried it out and it worked perfectly. Thanks so much for the help!!!
--
Matty


"Joel" wrote:

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.

"MaddyDread" wrote:

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.
--
Matty


"Joel" wrote:

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")



"Matty Dread" wrote:

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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
formulas change when copied Sean Excel Discussion (Misc queries) 6 March 23rd 09 08:25 AM
Change pivot source w/o refresh? Can't change original/copied pivo Toby Erkson[_5_] Excel Programming 4 July 16th 07 08:23 PM
copied formulas on Excel the value doesn't change Jane Excel Worksheet Functions 2 November 27th 06 04:50 AM
making copied cells change with change in original cell Jennifer Mcdermeit Excel Worksheet Functions 2 July 20th 06 04:58 PM
Excel file 4MB.Copied sheets to a new file.Now=64Kb-easier way? Suza Excel Discussion (Misc queries) 2 March 27th 06 03:15 PM


All times are GMT +1. The time now is 06:04 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"