Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automatic Update of Data Analysis Tools in Excel

Status
Not open for further replies.

eja5866

Technical User
May 19, 2003
19
US
Hi,

I'm looking for a way to do Automatic updating of Regression Analysis which I have on a spreadsheet. This is unlinke having a chart or cells linked where that is merely an option which is clicked off in calculations tab.
Presently I've created a Macro to run the Data Analysis section which looks like this:

Sub run_a_macro()
'
' run_a_macro Macro
' Macro recorded 11/15/2005 by
'
Application.Run "DoseResponse_dB_Template_ROUGH.xls!Regression_Analysis"

End Sub

Is there a way I can get this to automatically run say after a paste is done on the sheet? This is the only way I can think of to automate the Data Analysis tool. Does anyone have suggestions or can they offer a command to run the above Macro after a paste is done on the sheet?

Thanks!!

Ed

Kind Regards,

Edward Apacible
International Flavors & Fragrances
Ph: 732-264-4500 Ext. 3469
Fax: 732-335-2350
 
Perhaps in the Change event procedure of the Worksheet ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Okay,

I tried Change Event, Sheet Calculate Event, and Calculate Event.
None of them seem to Work. I still have to manually run the macro I made for Regression Analysis.

DiD I code swrong?
Any other suggestions?

Here's my most recent code:

Private Sub Workbook_SheetCalculate(ByVal Report As Object)
' Macro created 11/17/2005 by Ed
With Worksheets(1)
Range("A43").Select
Selection.Font.ColorIndex = 8
Application.Run "DoseResponse_dB_Template_ROUGH.xls!Regression_Analysis"
End With
End Sub


Kind Regards,

Edward Apacible
International Flavors & Fragrances
Ph: 732-264-4500 Ext. 3469
Fax: 732-335-2350
 
Here is My Change Event Code:

Private Sub Worksheet_Change(ByVal Sheet1 As Range)
' Macro created 11/17/2005 by Ed
Range("A43").Select
Selection.Font.ColorIndex = 8
Application.Run "DoseResponse_dB_Template_ROUGH.xls!Regression_Analysis"

End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top