Results 1 to 3 of 3

How to use Excel VBA Worksheet type objects?

Threaded View

  1. #1
    Registered User
    Join Date
    03-16-2022
    Location
    UK
    MS-Off Ver
    2016
    Posts
    2

    How to use Excel VBA Worksheet type objects?

    Hey Guys,

    What I'm trying to do is to create a random data generator to use in PowerBI.

    I'd like to use a VBA created Worksheet object to store the data generated
    but I'm getting the following error:
    "Run Time Error 91: Object variable ow With block variable not set"

    I've created the object with:
    Dim OUTPUT as Worksheet

    And then I try and assign value to some cell with:
    OUTPUT.Cells(1,1).Value="Hello World"

    I've seen example scripts assign existing sheets in the 'Microsoft Excel Objects'
    list to a Worksheet type variable. Is this the correct use or can I have a Worksheet
    type object exist independently from the 'Object' list.

    Thanks.
    Last edited by ASGR71; 03-22-2022 at 07:56 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 9
    Last Post: 10-18-2018, 05:02 PM
  2. setting up objects and extracting data from objects when of a user defined data type
    By whburling in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-30-2017, 12:40 PM
  3. [SOLVED] Microsoft Excel Objects (two different worksheet types)
    By TomSteude in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-05-2017, 09:17 AM
  4. Microsoft Excel Objects (two different worksheet types)
    By TomSteude in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-05-2017, 08:11 AM
  5. List Access DB objects by type with ADO
    By fredpox in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-31-2015, 09:15 AM
  6. Objects with .type property
    By atpgroups in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-02-2006, 07:05 AM
  7. Replies: 3
    Last Post: 05-22-2006, 02:25 PM

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