+ Reply to Thread
Results 1 to 4 of 4

multi-line VBA not working after column order change

  1. #1
    Forum Contributor
    Join Date
    05-09-2013
    Location
    Chicago
    MS-Off Ver
    Excel 2016
    Posts
    543

    multi-line VBA not working after column order change

    I changed the order and now the below line of code does not seem to work when the VBA is run. I attached the workbook as well. Thanks.


    Please Login or Register  to view this content.
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,610

    Re: multi-line VBA not working after column order change

    You don't need the With.. block.
    You have .Cells(iGender).Value
    It should be .Cells(irow, iGender).Value

    You need to make similar changes through out.
    Last edited by protonLeah; 05-09-2014 at 06:31 PM.
    Ben Van Johnson

  3. #3
    Forum Contributor
    Join Date
    05-09-2013
    Location
    Chicago
    MS-Off Ver
    Excel 2016
    Posts
    543

    Re: multi-line VBA not working after column order change

    Removed the with block and replaced it and get unqualified or invalid reference. Thanks.

    Please Login or Register  to view this content.

  4. #4
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,610

    Re: multi-line VBA not working after column order change

    You don't need the With rData.Rows(iRow)... because the code in in the sheet module.
    Please Login or Register  to view this content.
    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)

Similar Threads

  1. [SOLVED] Setting individual column width sizes for multi column listbox with VB2011 Mac not working
    By Nitefox in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 2
    Last Post: 01-26-2014, 06:19 PM
  2. [SOLVED] VBA to detect change in order number, then add a value to each 1st line of that order
    By Marijke in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-04-2013, 09:19 AM
  3. Replies: 10
    Last Post: 09-27-2012, 03:59 PM
  4. [SOLVED] Change order in a multi-shape group?
    By Jay in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-05-2006, 06:45 PM
  5. How do I change multi-line entries to single line entries in Exce.
    By CPOWEREQUIP in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-13-2005, 08: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