+ Reply to Thread
Results 1 to 4 of 4

I'm receiving a Run-Time error 1004 while trying to delete a product from a product list.

  1. #1
    Forum Contributor
    Join Date
    05-02-2013
    Location
    Indiana
    MS-Off Ver
    Excel 2016
    Posts
    190

    I'm receiving a Run-Time error 1004 while trying to delete a product from a product list.

    I'm in the process of writing User Form code for a new project. Right now I'm writing the moduel to Add and Delete a product list, but it gives me an application-defined or object-defined error. Does any one know what I have done worng? I have highlighted in red where the error occurs. Hopefully, if I get past this error, my code will delete the product from the list!
    Please Login or Register  to view this content.
    Thanks for your help! I have attached a copy of the spreadsheet.
    redsab
    Attached Files Attached Files
    Last edited by redsab; 07-05-2014 at 09:08 PM.

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: I'm receiving a Run-Time error 1004 while trying to delete a product from a product l

    There is no column zero.

    If ws.Cells(x, 0).Value = sProduct Then
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Forum Contributor
    Join Date
    05-02-2013
    Location
    Indiana
    MS-Off Ver
    Excel 2016
    Posts
    190

    Re: I'm receiving a Run-Time error 1004 while trying to delete a product from a product l

    AlphaFrong,
    Thanks, I was thinking that the first cell A1 was (0,0). I guess I never wood have gotten that to work!
    redsab

  4. #4
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: I'm receiving a Run-Time error 1004 while trying to delete a product from a product l

    You're welcome.

    For what it's worth, this uses the .Find Method to locate the product number.

    Please Login or Register  to view this content.

+ 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. Replies: 1
    Last Post: 06-20-2014, 03:38 PM
  2. How to use RANGE Statment - Receiving Error 1004
    By efisher in forum Excel Programming / VBA / Macros
    Replies: 23
    Last Post: 01-13-2014, 01:14 PM
  3. Produce Product list by product category
    By barnowl in forum Excel General
    Replies: 2
    Last Post: 01-03-2013, 05:57 PM
  4. [SOLVED] Find Product Details in Another Sheet based on Product ID and Copy some Fields From there
    By kevalkothari in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-29-2012, 10:43 AM
  5. [SOLVED] Need Function that will find ordered product, and display the product code in a 2nd workbk
    By rollerden in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-21-2012, 08:52 AM

Tags for this Thread

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