+ Reply to Thread
Results 1 to 2 of 2

Compile Error: Invalid Qualifier in column sum/cell naming program

  1. #1
    Registered User
    Join Date
    11-08-2007
    Posts
    1

    Compile Error: Invalid Qualifier in column sum/cell naming program

    I am running into a compile error: invalid qualifier when I run the included code.

    I am trying to create a macro that, when activated with a cell or merged cells selected, will sum the column in that cell(excluding the two header rows) and then naming the cell either "colSumCost" or "colSumWeight" depending on the column's header cell.

    I have a feeling that my background in VBScript might be a bit too far ahead of VBA, though I don't know why that would be. But it seems that the strings in my code do not want to allow the method such as .substring and .toLower to work as both have been highlighted (when I changed my code around, because as it stands only the part using .substring is highlighted) and neither are capitalized.

    I normally use the auto-correct feature to make sure that I typed in the correct code as it will capitalize the correct code that has been left lower case...

    Comments are included all throughout the code to explain what is happening (which is good because it takes way too long to type in all that again here!), but if you have any questions, you can e-mail me or get my aim screenname.

    Also included is a demo version of the spreadsheet I am using this code for. It is a basic inventory sample. It only has three columns filled in (Weight, CPG, and Cost) because Weight and Cost are the only two columns that the code will be used for and Cost is dependent on the other two. All numbers are random however (though close to what will really be used) so don't be afraid to change anything around... it's not like Ill be using your version anyways.

    Included Files: Inventory Sample.xls, Module16.bas (if you want to import the file directly into VBA), Both contained in CodeStuff.zip


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

  2. #2
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    Hi

    Made a couple of changes and it seemed to work when in C37.

    Please Login or Register  to view this content.
    HTH

    rylo

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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