+ Reply to Thread
Results 1 to 4 of 4

CreateObject("scripting.dictionary") Add Item Problem---->Empty Cells

Hybrid View

  1. #1
    Forum Contributor HerryMarkowitz's Avatar
    Join Date
    09-10-2012
    Location
    Europe
    MS-Off Ver
    Office 2021 - Win10
    Posts
    1,014

    CreateObject("scripting.dictionary") Add Item Problem---->Empty Cells

    Hi experts,

    1- Open enclosed file "Book1"
    2- Run Macro1 in order to see what Macro1 is doing.
    3- Close "Book1".
    (Everything is okey for Book1)

    4- Open enclosed file "Book2"
    5- Be careful that Cell B14, Cell B15 and Cell B16 are empty.
    5- Run Macro1 in order to see error!

    Actually, the reason of error is empty cells.

    Because empty data sheet name can not to be filled.

    How can I solve this error ?

    How CreateObject("scripting.dictionary") Add must not took empty data!

    Regards
    Attached Files Attached Files
    Last edited by HerryMarkowitz; 08-15-2014 at 05:00 PM.
    Sub DontForgetThese()
         If Your thread includes any code Then Please use code tags...
         If Your thread has been solved Then Please mark as solved...
         If Anybody has helped to you Then Please add reputation...
    End Sub

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

    Re: CreateObject("scripting.dictionary") Add Item Problem---->Empty Cells

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution.

    Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.

    To change a Title go to your first post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.

    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)
    If posting code please use code tags, see here.

  3. #3
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: CreateObject("scripting.dictionary") Add Item Problem---->Empty Cells

    Change
            If Not .exists(varitem) Then .Add varitem, Nothing
    to
            If Not IsEmpty(varitem) Then .Item(varitem) = Empty
    PS.

    I saw Norie's comment after I have posted this post.
    I think the thread title is clear enough....
    Last edited by jindon; 08-15-2014 at 05:04 PM.

  4. #4
    Forum Contributor HerryMarkowitz's Avatar
    Join Date
    09-10-2012
    Location
    Europe
    MS-Off Ver
    Office 2021 - Win10
    Posts
    1,014

    Re: CreateObject("scripting.dictionary") Add Item Problem---->Empty Cells

    Thanks Norie
    Thanks jindon

+ 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. [SOLVED] How to understand and use CreateObject("Scripting.Dictionary")
    By Darthzo in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 04-03-2013, 07:21 PM
  2. Replies: 2
    Last Post: 01-03-2013, 04:32 PM
  3. Why does =countif(range,"<>""") count empty cells?
    By Ingeniero1 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-16-2008, 01:40 PM
  4. Replies: 4
    Last Post: 02-03-2008, 05:11 PM
  5. Odd "Scripting" Icon in Excel cells
    By Randy Brown in forum Excel General
    Replies: 0
    Last Post: 04-24-2006, 09:10 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