0

enter image description here

I am creating a dynamic reporting tool that creates reports from data sourced from Wonderware. The data that is sourced is gathered from various pumps/flows/temps around site for operators/management to use. I want to create a dynamic sheet rather than use the wizards available because of limited IT experience of some of the operators.

I have managed to create the report but have one issue that i cannot resolve that would help the sheet become more user friendly.

I have some array formulas that link to cells that have dropdowns. (This is what helps make it user friendly). The drop down cells include, which server to look at, which tagname to look for, the start time, the duration and the number of cells in the array.

When changing the number of cells in the array cell dropdown the array doesnt change until you select a cell in within the array and then select the Refresh Function command. This then changes the array.

I want to write a macro that will select several cells on the sheet that have individual arrays and select Refresh Function command. I will then assign this to a shape that can quickly and easily be selected.

Can anyone help with this macro please?

Community
  • 1
  • 1

2 Answers2

0

You just need to add the reference to ActiveFactoryWorkbook in visual basic editor, and then something like this:

Range("B11").Activate
ActiveFactoryWorkbook.wwRefreshFunction

Be sure that in the cell B11 you will have a part of the array the query generates. As you have to refresh more than one array just copy the code again and change the cell reference.

salonso
  • 41
  • 2
  • 8
-1
Sub Workbook_RefreshAll()
  ActiveWorkbook.RefreshAll
End Sub
Mohammad Usman
  • 37,952
  • 20
  • 92
  • 95