Please some1 tell me this one 2 - last one i need V URGENT!
Upcoming Power Excel Seminars
Thanks Thanks:  0
Likes Likes:  0
Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Please some1 tell me this one 2 - last one i need V URGENT!

  1. #1
    Board Regular
    Join Date
    Mar 2002
    Posts
    122
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

     
    ive got this macro:

    Sub EnterAnotherSale()
    '
    ' EnterAnotherSale Macro
    ' Enters another sale into the system
    '
    Rows("5:5").Select
    Selection.Insert Shift:=xlDown
    Range("F5").Select
    ActiveCell.FormulaR1C1 = "=RC[-2]*RC[-1]"
    Range("A5").Select


    'Look for the ProductID in the Stock Table.
    StockWorkbook.Seek "=", ProductID

    'When found, take the current quantity and subtract from it the sold quantity.
    If Not StockWorkbook.EOF Then
    StockWorkbook.Edit
    StockWorkbook!Quantity = StockWorkbook!Quantity - SalesWorkbook!Quantity
    StockWorkbook.Update
    '

    End Sub

    But the bit 'Look for the ProductID in the Stock Table.
    StockWorkbook.Seek "=", ProductID

    'When found, take the current quantity and subtract from it the sold quantity.
    If Not StockWorkbook.EOF Then
    StockWorkbook.Edit
    StockWorkbook!Quantity = StockWorkbook!Quantity - SalesWorkbook!Quantity
    StockWorkbook.Update

    needs to run AFTER all the sale data has been entered and enter has been pressed in CELL F5. Plz can you give me the intermidiate code!?!?!?

  2. #2
    Board Regular
    Join Date
    Mar 2002
    Posts
    122
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    ............!!

  3. #3
    Board Regular
    Join Date
    Mar 2002
    Posts
    122
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    plzzzzzzzzzz

  4. #4
    Board Regular
    Join Date
    Mar 2002
    Posts
    122
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    this and the thing above is stopping me from finishing plz!!!

  5. #5
    Board Regular
    Join Date
    Mar 2002
    Posts
    122
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    SHOULD BE EASYYYYYY plz

  6. #6
    New Member
    Join Date
    Mar 2002
    Posts
    33
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    it sounds like the code at the end should be placed in a different subroutine. One solution is to place a button on the spreadsheet that the user clicks when finished entering information. Place the code in the click event of that button. I know there is a way to put some code in the Worksheet_Change event that will detect if something has been done to a particular cell, e.g. F5, but not sure how to do it offhand.

    [ This Message was edited by: tk19 on 2002-03-19 12:29 ]

  7. #7
    Board Regular
    Join Date
    Mar 2002
    Posts
    122
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    hey thanks a lot but does anyone know how to do that when enter is pressed in cell 5 it runs that code shown above???!?!? plzzzzz

  8. #8
    Board Regular
    Join Date
    Feb 2002
    Posts
    3,169
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hi Sam

    Hey we know your doing an exam, but cool be patient people will answer you given time, we are all busy doing excelling things. look ive gone back to help.

    OK look..

    F5 is the target and so what you need to find out is whats in cell F5 is it blank, what going to be entered text value, example please.

    so what you need to do is code out so:
    if F5 = or <> whatever then
    ....
    ....
    .
    ..
    Else
    ...
    ...

    your code, thats sort of idea will work easy enough.

    Sorry to be awkward but you must as ive said before understand your work, i have no education so i know the difference, understand mean results means PASS.

    Mighti suggest you check the VBA help files???

    Let us know what you have found out and tried and well do what we can..



    Free Excel based Web Toolbar available here.

    Jack in the UK
    J & R Excel Solutions
    "making Excel work for you"

  9. #9
    Board Regular
    Join Date
    Mar 2002
    Posts
    122
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Cell F5 is just the total cost of the cell. Its got the formula D5*E5. Help plz!

  10. #10
    Board Regular
    Join Date
    Mar 2002
    Posts
    122
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

      
    Cell F5 is just the total cost of the cell. Its got the formula D5*E5. Help plz!

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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

 

 
DMCA.com