View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
JLGWhiz JLGWhiz is offline
external usenet poster
 
Posts: 3,986
Default Copying Multipage1 to Multipage2

For the MultiPage itself, you cannot copy page 1 to page 2 as you would a
worksheet. You can copy each control (Text box, label, button, etc.) that is
on page 1, individually, to page 2 or other if you add more pages. Contrary
to what I previously said about the underlying code going with the control
when copied, the test I ran did not bear that out. VBA does automatically
increment the control name/number for you so that there is no confusion about
which one is which. It did not attach the click event code that was
underlying the control on pages(0). If you copy label1 from pages(0) to
pages(1) then on pages(1) it becomes label2 automatically. Apparently, the
code carryover only applies to certain type controls. I will have to
investigate that. Anyhow, I hope this helps you with your project.

"WLMPilot" wrote:

You indicate copying from workbook to workbook. I am stayting within the
same object (if that is the correct word). I created a userform with
multipage tabbing. I would like to have page2 be a mirror image of page1,
except I will use completely different coding since page2 will deal with
EDITING what has already be entered via page1. I was able to copy from page1
to page 2, taking the same code, or should I say that the fields referenced
the code already written.

Les

"JLGWhiz" wrote:

I just created two userforms and put a multipage on form1. I then copied it
to form 2, so it looks like they can be copied. I also copied it on the same
form.
According to all that I have read in the past, you can also copy the entire
UserForm from one workbook to another and it takes the underlying code with
it. The easiest way to find out these things is to try it. If it does not
work, then check in with the group to find out who knows why.

"WLMPilot" wrote:

I am setting up userforms on different multipages and I have some questions
since two things I want to accomplish involve the same userform for different
functions.

SETUP:
Multipage1 = userform to enter data.
Multipage2 = userform, that looks just like multipage1 userform, except it
will read
data in from spreadsheet for purpose of editing.

With this is mind, I am only going to create Multipage2 if there is a way to
copy multipage1 to multipage2.

Is this possible? If not possible, please help out with answering
questions below.

Since I am unable to copy userform to multipage2, I am going to need to
capture information from a spreadsheet, ie which commandbutton was clicked
(ENTER INFO, or EDIT info) and pass from the commandbutton 1 or 2 into the
userform initialization so that I can determine which way to go.

How can I do this?