• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

User Form to Multiply 3 variables from the selected cell

nagovind

Member
Dear All,

There are 3 variables in 3 different cells
Need to multiply through user form.
Requirement is

in A1, B1 and C1 cells the values exists (say variable 1, 2 and 3)

After clicking the command button, user form pops-up to ask for Enter 3 variables to multiply.

Here the query is three variables has to taken as an input automatically by clicking the required button in the user form with the caption "variable 1" FROM THE CURRENT CELL POSITION if the current cell is of string data the data has to be ignored or warning mesg to be displayed saying that data shall be integer

Hence as above with 3 buttons in the user form after clicking 3 input buttons "Variable 1" "Variable 2" and "Variable 3" answer is the product of 3 variables has to be displayed in the user for itself

Pelase advise the code and the methodology

PS: I'm not aware about the codes for user form as i'm a beginner to USER FORM

Please do the need full

Thanks
Govind
 
Govind,

Can you please attach a file with an example of what you are after
 
@Hui
Thank you for your reply
Actually the requirement is not just to multiply the number
Whether it is possible to take the input for second variable from the selected cell 'while user form is active - pops-up'

Input are in the active sheet but input cell varies with the calculation

So 3 variables located in 3 different cells randomly in a sheet need to be utilized in the calculation in the user form here in the example for just multiplication

The query is due to once the user form is activated it is not possible to touch or select a cell in the sheet

Thanks
Govind
 
I'm still unsure wether there is any logic in what your asking or if you want the user to be able to select things based on the first answers

You cannot display the built in range dialog, but you can display a dialog box that asks for a range like this:

Code:
Dim ThisRng As Range
Set ThisRng = Application.InputBox("Select a range","Get Range", Type:=8)

Can you please post a sample file ?
 
@ Debraj,

Thank you for your reply

I tried the Refedit tool. This is what i required exactly

Could you please advise how to assign the received input from this Refedit to a variable then my issue will be solved

Thanks
Govind
 
Hi Govind..

try this..

Code:
Private Sub CommandButton1_Click()
  ROT = Range(RefEdit1) * Range(RefEdit2) * Range(RefEdit3)
End Sub
 

Attachments

  • example.xlsm
    20.6 KB · Views: 5
@ Debraj,

Thank you for your reply
It is working ...i got the results
But in the REFEDIT box displays the selected range. Is there is any way to display the value instead of the selected cell address so that a user can understand the Input value
Please advise.

 
Back
Top