+ Reply to Thread
Results 1 to 4 of 4

Transferring Data from Immediate VBA window to a table

  1. #1
    Registered User
    Join Date
    02-14-2013
    Location
    Wisconsin, USA
    MS-Off Ver
    Excel 2010
    Posts
    55

    Transferring Data from Immediate VBA window to a table

    I didnt realize that the Immediate window is limited to 200 lines. I run a report that will have 3k lines so I need that info to be transferred to a table. I am very new to Access VBA. Any ideas? Here's my code:

    Public Function NTInfo()
    Dim oUser
    Dim rstRecords As DAO.Recordset
    Dim db As Database

    Set db = CurrentDb()
    Set rstRecords = db.OpenRecordset("qselP2P_WEEKLY", dbOpenDynaset)

    rstRecords.MoveFirst

    Do While Not rstRecords.EOF
    Set oUser = ADSearch.GetManagerInfo(CStr(rstRecords.Fields("UserName").Value))
    Debug.Print oUser.LastName, ";", oUser.Manager, ";", oUser.Department
    On Error GoTo KeepGoing
    KeepGoing:
    If Err.Description <> "" Then
    Debug.Print "InvalidNTID"
    End If
    rstRecords.MoveNext
    Loop

  2. #2
    Valued Forum Contributor xlbiznes's Avatar
    Join Date
    02-22-2013
    Location
    Bahrain
    MS-Off Ver
    Excel 2007
    Posts
    1,223

    Re: Transferring Data from Immediate VBA window to a table

    Hi,
    have a look at this link http://www.vb-helper.com/howto_ado_create_table.html
    Happy Computing ,

    Xlbiznes.

    To show your appreciation please click *

  3. #3
    Registered User
    Join Date
    02-14-2013
    Location
    Wisconsin, USA
    MS-Off Ver
    Excel 2010
    Posts
    55

    Re: Transferring Data from Immediate VBA window to a table

    Thanks for the response, I am not sure I follow that tho. Any other thoughts?

  4. #4
    Registered User
    Join Date
    02-14-2013
    Location
    Wisconsin, USA
    MS-Off Ver
    Excel 2010
    Posts
    55

    Re: Transferring Data from Immediate VBA window to a table

    one other thought would be to export to text file.. not sure how to do that either

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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