Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 470
Default Copying Multipage1 to Multipage2

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?


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default Copying Multipage1 to Multipage2

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?


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 470
Default Copying Multipage1 to Multipage2

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?


  #4   Report Post  
Posted to microsoft.public.excel.programming
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?


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default Copying Multipage1 to Multipage2

Another quirk in copying from page 1 to page 2 of the multiform was that on
the label that I copied, it did not change the caption on the label1 to
label2, but it did change the name to label2, so be careful about those type
disparities.

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




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 470
Default Copying Multipage1 to Multipage2

That helps. I will need to test a couple of things. Maybe you can point me
in the direction I should take. Basically this userform, which I use
Multipage Tabbing in, has about 30 fields (textboxes and 3 comboboxes). It
is for a pilot to enter a flight plan into a spreadsheet then print that
flight plan out.

My questions dealt with how to create a way to allow the pilot to edit this
info via the same userform. A commandbutton on sheet(1) (Edit Flight Plan)
would be clicked to execute this. I am not sure if it would be eaiser to
create a page2 (mirror image of page1), or use page1, thus having to capture
which commandbutton was pressed and use it to navigate around the original
code used for page1 (originally entering the data).

Thanks again for your time and input.
Les

"JLGWhiz" wrote:

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?


  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default Copying Multipage1 to Multipage2

I am not sure if I grasped the plan completely, but it seem that you have a
certain number of specific data elements that pertain to the flight plan.
You can do the edit with a multipage or you could create a listbox with the
dataelements listed in it and have the pilot click the data element he wants
to edit. Then the underlying code in the listbox (or combobox if you prefer
dropdowns) could call up the entry for editing.

Example of underlying code to a list/combo box.

Private Sub ListBox1_Click()
If ListBox1.Value = FltPlnItem2 Then
TextBox = FltPlnItem2.Text
End if
End Sub

Done properly, this would only need the one list or combo box and one
textbox to edit all of the flight plan data elements. You would probably
have to have a control button that restarts the macro again after each item
is edited. It would also need to save any changes that were made in the text
box. Just a thought. Might be better than thirty more controls in the
multipage.



"WLMPilot" wrote:

That helps. I will need to test a couple of things. Maybe you can point me
in the direction I should take. Basically this userform, which I use
Multipage Tabbing in, has about 30 fields (textboxes and 3 comboboxes). It
is for a pilot to enter a flight plan into a spreadsheet then print that
flight plan out.

My questions dealt with how to create a way to allow the pilot to edit this
info via the same userform. A commandbutton on sheet(1) (Edit Flight Plan)
would be clicked to execute this. I am not sure if it would be eaiser to
create a page2 (mirror image of page1), or use page1, thus having to capture
which commandbutton was pressed and use it to navigate around the original
code used for page1 (originally entering the data).

Thanks again for your time and input.
Les

"JLGWhiz" wrote:

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?


  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 470
Default Copying Multipage1 to Multipage2

Wow, if I could get by with that, it would be great. I just cannot grasp how
to do it exactly. I will show you basically what I have. I wish I could say
I have textbox1-22, and for the most part I do. However, I replaced about 5
textboxes with labels since they were pulling in "fixed" data from
spreadsheet vs having to be entered.
Also 3 comboxes (1-3).

My original idea was to use labels to display the different editable items
with an optionbutton beside each. Hence, edit which ever optionbutton is
TRUE.

Hope this gives you an idea.

Les


"JLGWhiz" wrote:

I am not sure if I grasped the plan completely, but it seem that you have a
certain number of specific data elements that pertain to the flight plan.
You can do the edit with a multipage or you could create a listbox with the
dataelements listed in it and have the pilot click the data element he wants
to edit. Then the underlying code in the listbox (or combobox if you prefer
dropdowns) could call up the entry for editing.

Example of underlying code to a list/combo box.

Private Sub ListBox1_Click()
If ListBox1.Value = FltPlnItem2 Then
TextBox = FltPlnItem2.Text
End if
End Sub

Done properly, this would only need the one list or combo box and one
textbox to edit all of the flight plan data elements. You would probably
have to have a control button that restarts the macro again after each item
is edited. It would also need to save any changes that were made in the text
box. Just a thought. Might be better than thirty more controls in the
multipage.



"WLMPilot" wrote:

That helps. I will need to test a couple of things. Maybe you can point me
in the direction I should take. Basically this userform, which I use
Multipage Tabbing in, has about 30 fields (textboxes and 3 comboboxes). It
is for a pilot to enter a flight plan into a spreadsheet then print that
flight plan out.

My questions dealt with how to create a way to allow the pilot to edit this
info via the same userform. A commandbutton on sheet(1) (Edit Flight Plan)
would be clicked to execute this. I am not sure if it would be eaiser to
create a page2 (mirror image of page1), or use page1, thus having to capture
which commandbutton was pressed and use it to navigate around the original
code used for page1 (originally entering the data).

Thanks again for your time and input.
Les

"JLGWhiz" wrote:

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?


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
Which is faster, copying range to another set of ranges or copying tomemory? axwack Excel Programming 2 December 12th 07 01:19 PM
Using ActiveSheet to Disable Multipage1 [email protected] Excel Programming 4 November 2nd 07 08:16 PM
copying the Hyperlink function result without copying the actual formula mcheng Excel Worksheet Functions 2 June 9th 07 02:43 AM
TextBox copying not like windows copying, heh? Antoine Excel Programming 3 August 16th 05 03:35 PM
Copying data down to next dirty cell, then copying that data slarson Excel Programming 0 September 15th 03 09:19 PM


All times are GMT +1. The time now is 04:44 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"