Event after update / calculation

  • Thread starter Thread starter Troubled User
  • Start date Start date
T

Troubled User

I have a spreadsheet with multiple sheets that run as a calculator.

I have an input sheet that routes a single column of information to the
calculator using a hlookup.

After you select a cell (column) the hlookup routes the information to the
calculator. At that point, after all the calculations are run I need copy
the information back from the calculator and store in the correct column.

I have tried using various events but everything returns the values prior to
selecting the particular column.

Any help is appreciated.
 
Since you posted this question in Excel Programming I am assuming you want
some VBA code. I'm not sure which event (if any) you use to apply the
calculation results to the worksheets. Do you have a Userform that does the
calculations? If not, I would just put a Command Button on a worksheet and
then assign this macro to it.

Private Sub CommandButton1_Click()

Application.ScreenUpdating = False

'puts results in specified cells
Sheet("Sheet1").Range("A1").Value = calculation1
Sheet("Sheet1").Range("A2").Value = calculation2
Sheet("Sheet1").Range("A3").Value = calculation3
Sheet("Sheet1").Range("A4").Value = calculation4
'etc.
End With

Application.ScreenUpdating = True

End Sub

Hope this helps!
 
Doesn't the calculate event give you the after-calculate view?

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
RyanH,

Thanks for your reply. I am using the click event to determine what
information (column) to route to the calculator. I need to return the
information from the calculator without pressing a button or having the user
do anything else, it just needs to run after the calculate event so that I
get the results. If I put this in my click event, I get the results before
the calculations.

Thanks in advance.
 
Cool, so you have a Click event already. Just put this portion of code at
the end of your Calculator Code. Since you said you want the calculations to
go to different worksheets and cells you will have to change the Sheet Names
and Range Address to your specifications.

Hope this helps!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top