Results 1 to 18 of 18

Capturing data from userform into the workbook

Threaded View

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

    Re: Capturing data from userform into the workbook

    
    
    
    Private Sub cmdClose_Click()
    Count = 1
    Dim myArray As Variant
    ReDim myArray(Me.Controls.Count)
    Dim cCont As Control
    
        For Each cCont In Me.Controls
        
    If TypeName(cCont) <> "Label" And TypeName(cCont) <> "Frame" Then
     temp = TypeName(cCont)
    ' Cells(1, Count).Value = cCont.Value
     myArray(Count) = cCont.Value
                
                
    Count = Count + 1
    End If
    10      Next cCont
    
    'Manipulate columns like this:-
    myArray(0) = myArray(24)
    
    Range("A1", Cells(1, Me.Controls.Count)).Value = myArray
    
    Unload Me
    End Sub
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] userform data capturing in next available row
    By ciapul12 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-21-2013, 05:24 PM
  2. [SOLVED] Capturing open workbook as variable?
    By aaron.irvine in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-11-2013, 04:34 AM
  3. Replies: 2
    Last Post: 04-14-2013, 05:27 AM
  4. Capturing data from a userform to a worksheet
    By goldbeje in forum Excel General
    Replies: 0
    Last Post: 08-29-2012, 07:22 PM
  5. Replies: 3
    Last Post: 10-18-2011, 11:30 AM

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