+ Reply to Thread
Results 1 to 12 of 12

Compile error variable not defined

  1. #1
    Forum Contributor
    Join Date
    11-25-2021
    Location
    INDIA
    MS-Off Ver
    2007
    Posts
    2,147

    Compile error variable not defined

    Hello code experts
    I am trying to resize the cells of columns E to L with A after filling the rows with some formulas posted after converting them into code.
    I have just compared a previous code and tried to do the same with this code. I am not able to understand how to define a variable like I am getting a compile error variable not defined. I need your expetise to define the variable and make this code running without error.
    Please note: A similar code is also in the workbook which is working but with a different range of columns.
    https://drive.google.com/file/d/1ws1...usp=share_link
    Last edited by RAJESH SHAH; 01-09-2023 at 01:43 AM. Reason: #Solved

  2. #2
    Forum Contributor
    Join Date
    11-25-2021
    Location
    INDIA
    MS-Off Ver
    2007
    Posts
    2,147

    Re: Compile error variable not defined

    I was able to copy the link to the original thread.
    Last edited by RAJESH SHAH; 01-08-2023 at 05:02 AM.

  3. #3
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Compile error variable not defined

    What, where, is the issue, there is NO compilation error ...?
    - Battle without fear gives no glory - Just try

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

    Re: Compile error variable not defined

    Please Login or Register  to view this content.
    What are you trying to do?
    x = 0 so can not Resize the range since it must be 1 or greater.
    temp = Empty, so no idea...

  5. #5
    Forum Contributor
    Join Date
    11-25-2021
    Location
    INDIA
    MS-Off Ver
    2007
    Posts
    2,147

    Re: Compile error variable not defined

    I am trying to fill cells from E2 to L2 by resizing it with column A. But I am getting a runtime error 1004.

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

    Re: Compile error variable not defined

    As I said x = 0, temp = Empty means no array, so that block means nothing and impossible.

  7. #7
    Forum Contributor
    Join Date
    11-25-2021
    Location
    INDIA
    MS-Off Ver
    2007
    Posts
    2,147

    Re: Compile error variable not defined

    Run only the Extract B2C code seperately. That is the one which is not working. The extract B2B is working and I copied the code and tried to create a likewise code Extract B2C. But failed to do so.

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

    Re: Compile error variable not defined

    That is the part of that procedure "DExtractB2C",,, I'm out and good luck.

  9. #9
    Forum Contributor
    Join Date
    11-25-2021
    Location
    INDIA
    MS-Off Ver
    2007
    Posts
    2,147

    Re: Compile error variable not defined

    But the first part of the code has printed the values in columns A B C and D. I am just trying to resize E to L with A. How do I correct this.?

  10. #10
    Forum Contributor
    Join Date
    11-25-2021
    Location
    INDIA
    MS-Off Ver
    2007
    Posts
    2,147

    Re: Compile error variable not defined

    By the time I was able to share the file, I was able to correct the compile error. Now the error is run time error 1004.

  11. #11
    Forum Contributor
    Join Date
    11-25-2021
    Location
    INDIA
    MS-Off Ver
    2007
    Posts
    2,147

    Re: Compile error variable not defined

    Guys, I am no coder. I am just playing with codes and trying out new things. I get your expertise to correct my code and make it right.

  12. #12
    Forum Contributor
    Join Date
    11-25-2021
    Location
    INDIA
    MS-Off Ver
    2007
    Posts
    2,147

    Re: Compile error variable not defined

    Shared the thread in other forum hopefully for some solution.
    https://forum.ozgrid.com/forum/index...ect-this-code/

+ 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. Compile error: Variable not defined
    By jrpuig1977 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 10-16-2014, 06:55 PM
  2. Compile error: variable not defined
    By jwoodman in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-12-2014, 06:52 AM
  3. Compile error Variable not defined...?
    By swade730 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-21-2013, 01:59 AM
  4. [SOLVED] Compile Error: Variable Not Defined
    By Limitedtimeonearth in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 06-03-2013, 03:07 PM
  5. Compile error variable not defined
    By AsifShabbir in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 04-04-2011, 10:53 AM
  6. Compile error on variable (not defined)
    By mqdias in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-12-2007, 06:47 AM
  7. [SOLVED] Compile error, variable not defined
    By davegb in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-19-2005, 12:06 PM

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