Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 85
Default Event after update / calculation

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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 586
Default Event after update / calculation

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!
--
Cheers,
Ryan


"Troubled User" wrote:

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.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Event after update / calculation

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)

"Troubled User" wrote in message
...
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.



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 85
Default Event after update / calculation

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.


"RyanH" wrote:

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!
--
Cheers,
Ryan


"Troubled User" wrote:

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.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 586
Default Event after update / calculation

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.

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


Hope this helps!
--
Cheers,
Ryan


"Troubled User" wrote:

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.


"RyanH" wrote:

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!
--
Cheers,
Ryan


"Troubled User" wrote:

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.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calculation on/off event andy62 Excel Programming 8 September 3rd 09 12:28 AM
Event Fired when Calculation Mode Changed Matthew Wieder[_3_] Excel Programming 0 May 21st 08 08:29 PM
Application.Calculation during Change Event Pflugs Excel Programming 0 August 2nd 06 06:19 PM
on Calculation event grievesy Excel Programming 3 June 1st 04 05:35 PM
change event/after update event?? scrabtree23[_2_] Excel Programming 1 October 20th 03 07:09 PM


All times are GMT +1. The time now is 12:00 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"