8 votes
Accepted

VBA - new built-in enumerations and backwards compatibility

Without Option Explicit, the msoGraphic identifier in that property scope is a Variant/Empty;...
Mathieu Guindon's user avatar
7 votes
Accepted

Add Default Rubberduck VBA Folder Annotation to VBProject.VBComponents

HasFolder = InStr(.Lines(1, .CountOfLines), Chr(39) & "@Folder") That condition can technically be True in ...
Mathieu Guindon's user avatar
3 votes

Excel VBA to powerpoint

Replace repeated operations with local helper methods With the addition of helper methods, duplicated code can be greatly reduced. Here, copying a Range from a ...
BZngr's user avatar
  • 1,217
3 votes
Accepted

Sub that calls itself when its parent Workbook is closed

Unfortunately, the Release magic trick is dangerous because it can mess with the underlying EbMode function used by VB to ...
Cristian Buse's user avatar
2 votes
Accepted

Update PowerPoint graphs from Excel file

Option Explicit +1 For having that. Declare your variables right before you use them. Dim SecondsElapsed As Double is declared ...
IvenBach's user avatar
  • 3,477
2 votes

Creating a PowerPoint in vba by calling "slide" subroutines

Public ppApp As PowerPoint.Application Public ppPres As PowerPoint.Presentation Public ppSlide As PowerPoint.Slide Assuming we're looking at a standard module, ...
Mathieu Guindon's user avatar
1 vote

Sub that calls itself when its parent Workbook is closed

Alternative suggestion too long for a comment. I wrote code to use WinAPI timers: Tick. Tick. *breathe* BOOM! - Setting up real, stable asynchronous callbacks with WinAPI Timers in VBA These can be ...
Greedo's user avatar
  • 2,385
1 vote
Accepted

Reliably setting keys in Windows Registry for a VBA addin

I have similar code in VBA to pull the version. It's much more simple because I can pull the version from the running application itself. It knows it's own version and doesn't care what arbitrary ...
HackSlash's user avatar
  • 382
1 vote
Accepted

Batch Insert Figures Into Powerpoint Slides with VBA

Overall, there's not much to comment on for the code logic -- it does what you need it to do. But there are some details to pay attention to that will help in this and future code. Always use ...
PeterT's user avatar
  • 2,096
1 vote

Extract data labels from a chart in PowerPoint to Excel

Even better than @Vityata's answer is to extract the labels into an array, then dump the array all at once into the worksheet. Note I'm using better variable names. ...
Jon Peltier's user avatar
1 vote

Extract data labels from a chart in PowerPoint to Excel

Would this work instead of all the loops: ...
Vityata's user avatar
  • 319
1 vote

Open Excel, grab information, store it locally and close Excel

First, you're right it won't work without the proper reference enabled, but that's later. Comments Comments - "code tell you how, comments tell you why". The code should speak for itself, ...
Raystafarian's user avatar
  • 7,139
1 vote

Find and Replace on PowerPoint Charts with Excel Sheets

This is pretty well optimized. All I can say is that some variables could have better names ...
Raystafarian's user avatar
  • 7,139

Only top scored, non community-wiki answers of a minimum length are eligible