Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 104
  • Last Modified:

Macro using SendKeys

Folks,
I know of several ways to refresh data in a pivot table. The one I am interested in doing is a macro using SendKeys, "Alt + F5". Possible?
0
Frank Freese
Asked:
Frank Freese
  • 5
  • 4
1 Solution
 
Martin LissRetired ProgrammerCommented:
What happens if you record a macro while doing it manually, undoing the change and then running the macro?
0
 
Frank FreeseAuthor Commented:
I tried that and nothing was recorded.
I'm "thinking" this will work?

Sub UpdatePivot()

SendKeys "%{F5}"

End sub
0
 
Martin LissRetired ProgrammerCommented:
Sure but (and I don't know much about pivot tables) would you need to add code to select the table?
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
Frank FreeseAuthor Commented:
All the user has to do is click on the pivot table. I don't know how to select a pivot table vba, yet!?
0
 
Frank FreeseAuthor Commented:
I can select a pivot table using vba - but the pivot table name would have to remain static and I'm not sure how that's going to hold up?
0
 
Martin LissRetired ProgrammerCommented:
This refers to the 1st pivot table on the sheet.

ActiveSheet.PivotTables(1).Name
0
 
Frank FreeseAuthor Commented:
thanks Martin
Have a Happy Thanksgiving
0
 
Frank FreeseAuthor Commented:
thank you kindly sir
0
 
Martin LissRetired ProgrammerCommented:
YW U2
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 5
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now