Results 1 to 9 of 9
  1. #1
    5 Star Lounger
    Join Date
    Aug 2001
    Location
    Surrey, United Kingdom
    Posts
    1,001
    Thanks
    0
    Thanked 0 Times in 0 Posts

    User Form: can this be done (2003 SP2)

    Evening all

    Before I embark on this and start to post the inevitable questions that will go with it I would like to find out if what I want to do is possible.

    I would like to build a form to calculate volume for airfreight (see example drawn in Word below). The user would enter the the details into the Length, Width, Height, Pieces and actual weight fields and the volume field would contain the formula =LengthxWidthxHeightxPieces / 6000 the total actual column and total volume column would add up all of the totals above and the final field 'chargeable would say =IF(ActualTotal>VolumeTotal,ActualTotal,IF(ActualC olumn<VolumeTotal,VolumeTotal,")) and the result would be entered into a specific cell on a worksheet.

    Do userforms work like this?

    Thanks for any input

    Steve
    Attached Images Attached Images
    Cheers

    Steve

    Asking the questions everbody wants the answers too but feels too stupid to ask themselves :-)

  2. #2
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: User Form: can this be done (2003 SP2)

    It can work to seem like that, but would not be like that. You can make them all text boxes and when the appropriate boxes have values in, the code would run to populate with values (using your formulas in VB) the "formula text boxes". (the formula boxes would not be enabled for the user to enter directly - I would even format differently]

    When the code is filling in the "formula textboxes" it could also populate a specific cell on a worksheet.

    You could check after each field and when all have been entered, then run the code to update the formulas and the worksheet (or have a calculate/update button)

    Steve

  3. #3
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: User Form: can this be done (2003 SP2)

    As a matter of interest, why do you want to use a userform for this when it would be a piece of cake in a worksheet?
    Regards,
    Rory

    Microsoft MVP - Excel

  4. #4
    5 Star Lounger
    Join Date
    Aug 2001
    Location
    Surrey, United Kingdom
    Posts
    1,001
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: User Form: can this be done (2003 SP2)

    Hi Rory

    I have many worksheets that I already do this with but taking up 12 rows always makes it look cumbersome and unwieldly, I thought that a 'pop up' calculator would be better, thats it really.

    Cheers

    Steve
    Cheers

    Steve

    Asking the questions everbody wants the answers too but feels too stupid to ask themselves :-)

  5. #5
    5 Star Lounger
    Join Date
    Aug 2001
    Location
    Surrey, United Kingdom
    Posts
    1,001
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: User Form: can this be done (2003 SP2)

    Thanks for the input Steve

    Overall it seems like too much trouble for the + side of the worksheet looking good. I think I will stay with what I have

    Cheers

    Steve
    Cheers

    Steve

    Asking the questions everbody wants the answers too but feels too stupid to ask themselves :-)

  6. #6
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: User Form: can this be done (2003 SP2)

    You could use a spreadsheet control from the Office Web Components on the userform.
    Regards,
    Rory

    Microsoft MVP - Excel

  7. #7
    5 Star Lounger
    Join Date
    Aug 2001
    Location
    Surrey, United Kingdom
    Posts
    1,001
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: User Form: can this be done (2003 SP2)

    Hi Rory

    I have never heard of this, I am off for a read up

    Cheers

    Steve
    Cheers

    Steve

    Asking the questions everbody wants the answers too but feels too stupid to ask themselves :-)

  8. #8
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: User Form: can this be done (2003 SP2)

    Instead of a userform, you could also use a separate worksheet as the "form".

    You can have a macro copy and paste the values or have the macro enter the cells into the other sheet as desired...

    Steve

  9. #9
    5 Star Lounger
    Join Date
    Aug 2001
    Location
    Surrey, United Kingdom
    Posts
    1,001
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: User Form: can this be done (2003 SP2)

    Thanks Steve

    Thats a good idea, thanks for the input

    Cheers

    Steve
    Cheers

    Steve

    Asking the questions everbody wants the answers too but feels too stupid to ask themselves :-)

Posting Permissions

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