Hi All,
I have a large workbook that has a sheet which calculates results with and without inflation. I have code that changes inflation to 0 and then back to what it was originally. Before I copy the original assumptions back I need to calculate just one sheet that is selected in a drop-down box in a sheet. That way I can copy and paste values to the output report. Everything works fine except I can't get it to calculate just the selected sheet. The only way I've been able to get it to work is by calculating the entire workbook which takes some time.
So, I need a way to pull the sheet name from a cell and use it to calculate just that one sheet. Below is an unsuccessful attempt I took at doing that.
Any help is greatly appreciated as I'm a novice in vba.
Cheers - Dman333
Private Sub CommandButton1_Click()
Dim ws As Worksheet
Set ws = Worksheets("Prof by Pl (no infl)").Range("A1")
ws.calculate
I have a large workbook that has a sheet which calculates results with and without inflation. I have code that changes inflation to 0 and then back to what it was originally. Before I copy the original assumptions back I need to calculate just one sheet that is selected in a drop-down box in a sheet. That way I can copy and paste values to the output report. Everything works fine except I can't get it to calculate just the selected sheet. The only way I've been able to get it to work is by calculating the entire workbook which takes some time.
So, I need a way to pull the sheet name from a cell and use it to calculate just that one sheet. Below is an unsuccessful attempt I took at doing that.
Any help is greatly appreciated as I'm a novice in vba.
Cheers - Dman333
Private Sub CommandButton1_Click()
Dim ws As Worksheet
Set ws = Worksheets("Prof by Pl (no infl)").Range("A1")
ws.calculate