+ Reply to Thread
Results 1 to 5 of 5

Pasting data from excel to userform

  1. #1
    Registered User
    Join Date
    05-12-2016
    Location
    Mumbai, India
    MS-Off Ver
    2010
    Posts
    56

    Pasting data from excel to userform

    I am trying to paste data from excel to userform. I have tried using ShowModal but the problem I am getting is the data that is supposed to be pasted in excel changes. Please help. The problem I am getting is shown in the attached file.
    problem2.jpg

  2. #2
    Valued Forum Contributor ranman256's Avatar
    Join Date
    07-29-2012
    Location
    Kentucky
    MS-Off Ver
    Excel 2003
    Posts
    1,177

    Re: Pasting data from excel to userform

    select the row you want copied to the form
    click the macro button/or run macro

    at form activate event

    r = activecell.row
    txtBox1 = range("A" & r).value
    txtBox2 = range("D" & r).value
    cboBoxState = range("C" & r).value

  3. #3
    Registered User
    Join Date
    05-12-2016
    Location
    Mumbai, India
    MS-Off Ver
    2010
    Posts
    56

    Re: Pasting data from excel to userform

    The excel sheet from which the data is to be copied changes every time as in a new excel file. (Eg:- Item Description, Quantity & Amount is to be selected from Purchase Order. I have to do it for every Purchase Order during filling the form.) I am able to paste the data. The data filled in the form was getting pasted correctly including multiline textboxes. But after starting ShowModal the singleline textbox data gets pasted on the last line of multiline data.

  4. #4
    Registered User
    Join Date
    05-12-2016
    Location
    Mumbai, India
    MS-Off Ver
    2010
    Posts
    56

    Re: Pasting data from excel to userform

    Guys, please help. Have to complete it by end of this week.

  5. #5
    Registered User
    Join Date
    05-12-2016
    Location
    Mumbai, India
    MS-Off Ver
    2010
    Posts
    56

    Re: Pasting data from excel to userform

    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. Grouping data in excel and Copy pasting data in Notepad
    By harshit_0078 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-15-2015, 09:49 AM
  2. Copying data from one excel file and pasting into multiple excel files
    By tonybeo in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-26-2014, 06:23 PM
  3. [SOLVED] EXCEL USERFORM- pull data from sheet 1 into userform
    By PANTECH in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-18-2013, 11:10 AM
  4. Quality problem pasting picture in userform in Excel 2007
    By japiejum in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-18-2013, 04:41 AM
  5. VBA Help needed for pasting data based on userform selection
    By krjoshi in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-08-2012, 11:22 AM
  6. UserForm and Pasting Information
    By Sargon in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-22-2008, 12:27 AM
  7. Replies: 1
    Last Post: 08-28-2005, 09:05 AM

Tags for this Thread

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