problem multipage with userform doesn't copy data from tools to sheet

0

hello

I designed  userform contains  two  multipage , each multipage linked  with  specific sheet  it  supposses  copying  to the specific sheet  but all  my codes in  userform  doesn't work  I know there is smome  thing is missed becuase of tool of " MULTIPAGE "  so I  truly  appreciate  if  anybody looks  my  file  and  guide  me  what I have to  do 

thanks  

Answer
Discuss

Answers

0

Your UserForm1 contains two pages, Page1 and Page2. Each of these pages contains a frame, Frame1 and Frame3. Now my question. Where is TextBox1?

  • Is it on UserForm1?
  • Is it on Page1?
  • Is it in Frame1?

You can't see the answer. It was determined by the sequence and the exact way in which the controls were created. But you can test.

  • Debug.Print Me.TextBox1.Value
  • Debug.Print Me.Page1.TextBox1.Value
    or Me.Controls("Page1").TextBox.Value
  • Debug.Print Me.Page1.Frame1.TextBox1.Value
    or Me.Controls("Page1").Controls("Frame1").TextBox.Value

Only one of these will work because TextBox1 is in only one of these locations. The same applies to your command buttons. With a single click you can move from Me.Page1.Frame1.TextBox1 to Me.Page1.Frame2. It's incredibly complex, meaning it must be set up incredibly exact.

Your setup is of unknown quality. But,by not naming the controls, you made it very difficult for anyone but yourself to find his way around. I think, if your form is created perfectly and everything named clearly it will be very difficult to help you. By taking a less demanding approach you might reach your goal easier.

Edit 26 Mar 2021   =======================================

OK, Leopard. The code you want is in the attached workbook. There is some action you need to take. Please look into the comments. Come back to this post when you hit the problems I'm anticipating. Good luck!

Discuss

Discussion

variatus  
I wondered    from  you asking  me  where  is  the  texbox1     the  textbox1,2,3,4and labl1,2,3,4 and  commandbutton1,2  are  found  in page1  in  frame1   and  the  page2   contains  frame3  also  contains  textbx 5,6,7,8 and lable5,6,7,8 and  commandbutton3,4  where  is  the problem when you  said  naming the controls I  no  konw  wher  is  the  problem  in my  desighned  form   when  select  the  page  and  the  frame  and  th  tools ,  it  will show  the  names  by  properties the  vba windows  by  the  way  I  try  to do your  suggestion  above  but  doesn't  work  which of  them
leopard (rep: 52) Mar 25, '21 at 4:12 am
Add to Discussion


Answer the Question

You must create an account to use the forum. Create an Account or Login