+ Reply to Thread
Results 1 to 7 of 7

vba version of Option Strict off

  1. #1
    Registered User
    Join Date
    08-27-2014
    Location
    Albany, NY
    MS-Off Ver
    Office 2010
    Posts
    91

    vba version of Option Strict off

    In .NET, you can turn Option Strict off and a collection's data type will be implicitly defined, so if I input a set of ranges as the collection items, they will come out as ranges, but I am having a problem with VBA, I am making a collection of cells in a range, but when I check the immediate window for the data type, and its Variant. I want to put in ranges and work with those ranges....why is it converting? is there a way for it not to?

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: vba version of Option Strict off

    Can you post your code?
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    08-27-2014
    Location
    Albany, NY
    MS-Off Ver
    Office 2010
    Posts
    91

    Re: vba version of Option Strict off

    Its an *.xla I have attached it, you have helped me with part of it earlier, I remember the name.

    ListComparer3 (2).zip

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: vba version of Option Strict off

    Which collection do you want to be made up of ranges rather than variants?

  5. #5
    Registered User
    Join Date
    08-27-2014
    Location
    Albany, NY
    MS-Off Ver
    Office 2010
    Posts
    91

    Re: vba version of Option Strict off

    I want to use UserRanges as the collection of ranges

  6. #6
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: vba version of Option Strict off

    Remove the () around rng, they cause rng to be evaluated.
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    08-27-2014
    Location
    Albany, NY
    MS-Off Ver
    Office 2010
    Posts
    91

    Re: vba version of Option Strict off

    really?!? Dunce cap of the year for this kid

+ 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. Strict Parse Error
    By greyclear in forum Excel General
    Replies: 7
    Last Post: 09-22-2014, 04:16 PM
  2. Multiple Excel (2010 Version) Print With Fit To Option..
    By suryatry26 in forum Excel General
    Replies: 0
    Last Post: 07-15-2013, 10:58 AM
  3. [SOLVED] Import an Image into Excel using VB.Net and Option Strict On
    By Jedawi in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-02-2013, 11:33 PM
  4. Formula for Strict the Value enter in the Cell
    By VICTOR5 in forum Excel General
    Replies: 6
    Last Post: 04-13-2011, 04:00 PM
  5. [SOLVED] Strict parse error
    By Nilay Kothari in forum Excel General
    Replies: 2
    Last Post: 11-17-2005, 04:40 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