+ Reply to Thread
Results 1 to 5 of 5

Guidance on which Object Model to use

  1. #1
    Registered User
    Join Date
    12-09-2009
    Location
    Palatine, Illinois
    MS-Off Ver
    Excel 2007
    Posts
    30

    Guidance on which Object Model to use

    Hello -

    I am new to learning VBA, and want to try to learn this out on my own, but want to see if there is anyone that can tell me which object model that I should be using to write vba code for these functions, or if it's even possible. The list that I was reviewing (linked below) has too many for me to look through one by one to figure it out.

    I created a report/form that has a bunch of Vlookup's to reference another stored excel workbook. I currently have about 150 people that I run this report for, and was looking to see if there is an object model that I could use that would run the report for a list of people in a named range, and save the reports to a folder.

    HTML Code: 
    Any guidance is appreciated in advance!

    -SMB

  2. #2
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,972

    Re: Guidance on which Object Model to use

    If you are using Excel, you want the Excel object model. Beyond that, I don't really understand what your question means, I'm afraid.
    Everyone who confuses correlation and causation ends up dead.

  3. #3
    Registered User
    Join Date
    12-09-2009
    Location
    Palatine, Illinois
    MS-Off Ver
    Excel 2007
    Posts
    30

    Re: Guidance on which Object Model to use

    Sorry, I guess I could've been a little more clear. I have never written VBA code, and am not sure if this is even possible, let alone where to look. I am using excel, and looking through the linked list of different object models.

    I have a dropdown on sheet 1 that contains all of the people's names that i need to run the report for. The report is on sheet 2. I want to be able to write code that runs the report on sheet 2 for all of the names in the list on sheet 1, saving a copy of each report. to a new workbook, then to a specified folder.

    I will work on creating a postable version for reference.

  4. #4
    Registered User
    Join Date
    12-09-2009
    Location
    Palatine, Illinois
    MS-Off Ver
    Excel 2007
    Posts
    30

    Re: Guidance on which Object Model to use

    Hope this helps..couldn't provide much more data than this.
    Attached Files Attached Files

  5. #5
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,972

    Re: Guidance on which Object Model to use

    Everything in that link you posted is part of the Excel Object Model, by the way.

    See attached file, where I added some code to loop through all the staff members and also altered your combobox as it was linked to the wrong cell.
    Attached Files Attached Files

+ 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