+ Reply to Thread
Results 1 to 2 of 2

selecting ranges

  1. #1
    Registered User
    Join Date
    01-03-2007
    Posts
    7

    selecting ranges

    I have used excel for a few years but very basically. I have done some programming w/VB and i have done many databases with Access. I have a general idea how to use some programming with excel but total newbie. I have a pricelist with every item having 3 seperate prices from high to med. to low. There are 4 large groups of these items. I want to put in 4 sets of option buttons that will select for a single group the "high" "med" or "low" priced item and multiply it by the "quantity needed" the user has selected.
    For instance column d is high price, column e is med. colum f is low
    if the user selects option button High, if the user puts in 2 as the quantity needed, the total cost will multiply 2X the high price value

  2. #2
    Forum Contributor
    Join Date
    11-29-2003
    Posts
    1,203
    I suspect the reason you have not received any replies yet is because you have not given enough information to allow a complete response.

    You have told us which columns are high/medium/low, but I have no idea how the user will indicate quantity, or which row I should be reading the high/medium/low from. I do not know if the option buttons are on a form or embedded in a worksheet. In short, I cannot be of a lot of help.

    I can suggest a couple of things to help you move forward, though. One thing might be to check out some of the links provided in this posting:
    http://www.excelforum.com/showthread.php?t=584092

    Another thing is to explain that there are several ways you can reference an Excel Range within VBA. For example:
    Please Login or Register  to view this content.
    ThisWorkbook in Excel is somewhat analogous to CurrentDb in Access. The big difference is that ThisWorkbook is also an object with has Events that you can capture.

    Unlike Access, Excel does not require complete hiearchy to be defined. This is both good and bad. It greatly simplifies your code, and it greatly increases the likelihood that you will operate on an object that was not your intended object.

    So, following the example above, if ThisWorkbook is the active workbook, and "Sheet1" is the active sheet, you could have written the above as
    Please Login or Register  to view this content.
    You could also have written
    Please Login or Register  to view this content.
    Hope this gets you started.

+ 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