Consulting

Results 1 to 3 of 3

Thread: Excel VBA Shopping Cart

  1. #1
    VBAX Newbie
    Joined
    Nov 2011
    Posts
    2
    Location

    Excel VBA Shopping Cart

    Hello,

    I am working on a project that is quite extensive and to be honest I am Relatively new to vba, as well as to the forum. I am trying to make a shopping cart that works as follows; I have a spreadsheet called ShoppingCart and it contains a listbox (ProductList) that displays 9 products. I want to make a single click procedure that pops open a User Form (FrmShirts) when a specific product is clicked. This form needs to be specific to the product clicked. For instance, the User form must contain an image of the specific shirt clicked. While also displaying a specific price for that Item, a title of the product (The product name; which is displayed in the ProductList), and a discription of the product (i.e "This Shirt is printed on a 100% Cotton American Apparrel Shirt....").

    Currently all I have completed is the PropertiesList ListBox, which contains the 9 products. Currently I have the reference for the listbox in the same worksheet, in coloumn J (columun I contains product #'s, and column K contains Product $'s) The List Box's Single click procedure brings up FrmShirts, which contains the layout of the User Form (i.e 2 Buttons (Close and Add to Cart), and an empty image box for the undeclared image, text boxes for the decription and price, and option buttons (S,M,L,XL). But I am stumped on how exactly to set the variables for all the changing properties in the user form

    [VBA]Private Sub ProductsList_Click()

    FrmShirt.Load
    With FrmShirt
    ShirtImage =
    ShirtLabel =
    DescriptionBOX =
    PriceBox =

    End Sub[/VBA]

    I am not sure if I even have the right syntax. I assume I have to set variables to all the FrmShirt properties. But how do I go about that? How specifically do you load pictures to that ShirtImage Image box as a variable and where should I keep the information for the properties.

    (After I want the Add to Cart Button to Put the selected shirt and its approriate properties into a virtual shopping cart (i.e. in a different Spreasheet)

    Thanks, Ryan

  2. #2
    Knowledge Base Approver VBAX Guru GTO's Avatar
    Joined
    Sep 2008
    Posts
    3,368
    Location
    Greetings Ryan and welcome to vbaexpress :-)

    I would suggest zipping several small jpg's and the workbook (in .xls format), and attaching the zip.

    Mark

  3. #3
    VBAX Newbie
    Joined
    Nov 2011
    Posts
    2
    Location

    Shopping cart problem

    Hey,

    Sorry for the delayed response Mark I was finishing up another project but here is that zip. I am in desperate need of some help on this one. I have also attached a general scope of the problem in a word document.

    Thanks for any and all help

    Ryan
    Attached Files Attached Files
    Last edited by Rpsnike9; 11-30-2011 at 02:28 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •