Consulting

Results 1 to 2 of 2

Thread: Copy the value of a textbox from UserForm2 to another textbox of UserForm1

  1. #1
    VBAX Newbie
    Joined
    Jan 2017
    Posts
    1
    Location

    Copy the value of a textbox from UserForm2 to another textbox of UserForm1

    Hi everybody,
    i'm sorry but i didnt find the correct solution in other threads...
    i have a macro on ppt with 2 userform ( 1 & 2 ). In userform1 i have a textbox in which i put a number and then i click on a button and it starts duplicating some slides i chose. After this, it changes userform. I want that on a textbox on userform2 appears the number i put on the textbox on userform1. i tried with "Me" istruction and many other but nothing... ( i read other threads but it didnt solve my problem

    thanks again

  2. #2
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,094
    Location
    When you say "After this, it changes userform" does form 1 unload and form 2 load?

    If so you can use the QueryClose event of form 1 to load the value into a Public variable and the Activate event of form 2 to load the value in the variable. There are many other scenarios e.g. using the change event of the first textbox to set the variable.
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •