+ Reply to Thread
Results 1 to 6 of 6

Looking to input information on one userform and display it on the next one.

Hybrid View

  1. #1
    Registered User
    Join Date
    02-14-2017
    Location
    Dublin
    MS-Off Ver
    2010
    Posts
    10

    Looking to input information on one userform and display it on the next one.

    Hi,

    New to this forum, relatively familar with programming concepts and logic however i am seeking the best way in going about creating a tool in excel which I have never done.

    I am looking to create a small app that will contain a userform with some input forms such as text box's.

    Then I am looking to press a create button and this information entered into the textboxes along with the label associated with it to be displayed on another userform in a formatted way which i can easily copy & paste such as using Ctrl+ C&V or a copy button, I should be fine creating buttons and trasnferring the info from the entry forms to the 2nd userform textbox but I am unsure how to include the labels associated.

    As you can see in the current userform 2 has labels also but I found when I tried to copy and paste that these didn't copy, so now I am thinking of just creating one big text box but getting the label names from the first userform.

    Any help would be much appreciated.
    Attached Images Attached Images
    Last edited by diskin8; 03-02-2017 at 01:07 PM.

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Looking to input information on one userform and display it on the next one.

    Hi

    Welcome to the forum

    Why would you need a second userform?

    Once you have entered all your data why not just write it to your spreadsheet?

    From now on please post your spreadsheet not pictures.

    I sometimes get annoyed at having to duplicate someones work and then I do not respond.

    As you are new I will help you as best as I can.

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.


    Ok this does what you want I think.

    
    Private Sub CommandButton1_Click()
    
    'This creates an array that we can use to write our data to Excel
    'Not really useful here but if you have a lot of data to write this becomes a huge time saving
    
    Dim MyArray(3)
    
    'If you use numbered Controls then you can use a for next loop to manipulate your data
    For Count = 0 To 3
    MyArray(Count) = Me.Controls("Label" & Count + 1).Caption & ":  " & Me.Controls("Textbox" & Count + 1).Text
    Next
    
    'This writes your data to excel in one go
    Range("A1:A4").Value = Application.Transpose(MyArray)
    
    Range("A1").Select
    
    End Sub
    Attached Files Attached Files
    Last edited by mehmetcik; 02-15-2017 at 01:58 PM.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  3. #3
    Registered User
    Join Date
    02-14-2017
    Location
    Dublin
    MS-Off Ver
    2010
    Posts
    10

    Re: Looking to input information on one userform and display it on the next one. -workbook

    Quote Originally Posted by mehmetcik View Post
    Hi

    Welcome to the forum

    Why would you need a second userform?

    Once you have entered all your data why not just write it to your spreadsheet?

    From now on please post your spreadsheet not pictures.

    I sometimes get annoyed at having to duplicate someones work and then I do not respond.

    As you are new I will help you as best as I can.

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.


    Ok this does what you want I think.

    
    Private Sub CommandButton1_Click()
    
    'This creates an array that we can use to write our data to Excel
    'Not really useful here but if you have a lot of data to write this becomes a huge time saving
    
    Dim MyArray(3)
    
    'If you use numbered Controls then you can use a for next loop to manipulate your data
    For Count = 0 To 3
    MyArray(Count) = Me.Controls("Label" & Count + 1).Caption & ":  " & Me.Controls("Textbox" & Count + 1).Text
    Next
    
    'This writes your data to excel in one go
    Range("A1:A4").Value = Application.Transpose(MyArray)
    
    Range("A1").Select
    
    End Sub

    Thank you for your welcome & reply

    I need a second userform as I am only looking to display the information & copy and paste it to another system, not enter it into a spreadsheet, I might look at that later as an added feature to store your notes but at the moment I am just looking to format it & allow the user to easily copy said output to another system.

    So the first userform will allow me to enter the data, then output it to the second userform where I will have a copy button or for people that like to Ctrl + A, C, that functionality will be also be available. The reason I want it on a userform is because when the user exits the second user form the values of the labels will reset and the user can start again immediatley & as quick as possible.

    Essentially a notes tool that I can use in a call centre environment for my note taking.

    Also sorry for naiveness, when you say me.controls do you mean the name of my userform by saying 'me'.

    Thanks again,
    Attached Files Attached Files
    Last edited by diskin8; 02-16-2017 at 02:08 PM.

  4. #4
    Registered User
    Join Date
    02-14-2017
    Location
    Dublin
    MS-Off Ver
    2010
    Posts
    10

    Re: Looking to input information on one userform and display it on the next one.

    bump, updated post with copy of my workbook

    You can get the jist of the idea of the tool, I'm just looking for a work around to copy all information from ToolUserForm to Note .

    The numbered loop would work fine for skipping through an aray of the information but I need to get it all into a textbox to easiloy copy and paste it out of there to another system.

    Anyone any ideas or work arounds?

    You can see my original idea with the text box & labels but the labels do not highlight with the text box.

  5. #5
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Looking to input information on one userform and display it on the next one.

    The server would not let me post into this post earlier.

    I will try again

    I cannot post my code.

    Try the example attached.
    Attached Files Attached Files
    Last edited by mehmetcik; 02-16-2017 at 06:48 PM.

  6. #6
    Registered User
    Join Date
    02-14-2017
    Location
    Dublin
    MS-Off Ver
    2010
    Posts
    10

    Re: Looking to input information on one userform and display it on the next one.

    Yes this is something very similar to what I was thinking, you have provided me with the basics that I can work off, edit & learn.

    Thank your for your help.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Problem with display information in userform from the sheets (Please help me)
    By lacromo in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-22-2015, 12:47 PM
  2. [SOLVED] Userform Label to display information from several textboxes
    By dylanrose in forum Excel Programming / VBA / Macros
    Replies: 21
    Last Post: 05-21-2014, 09:46 PM
  3. [SOLVED] Userform to input information into cells
    By Spritz in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-30-2013, 11:37 AM
  4. How to display information in the title of a userform
    By welchs101 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-05-2011, 07:01 AM
  5. Use 'Userform to input information into a locked speadsheet
    By JamesT1 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-10-2011, 08:13 AM
  6. UserForm to Input and Edit Sales Information
    By shaik.ibrahim in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-21-2011, 04:35 AM
  7. Promt user for input, then use that information to obtain/display an average number?
    By theirishdancer in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-20-2010, 01:51 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1