Forum Discussion
Excel macro VBA issues
See whether below can help:
1. Macro Skipping in Main Routine
If a macro runs fine standalone but gets skipped when called from another macro, check for:
• Missing Call keyword or incorrect syntax:
Call MySubRoutine
• Error handling suppressing execution: If you're using On Error Resume Next, it might be silently skipping over errors. Try commenting it out temporarily or using:
On Error GoTo ErrorHandler
• Exit points or conditional logic: Make sure there’s no Exit Sub or If block that prevents the call from executing.
2. Unexpected Application Windows & Clipboard Errors
Seeing phantom windows and clipboard errors could be due to:
• Shell or external calls in your macro (e.g., Shell, CreateObject, SendKeys)
• Clipboard contention: Even if you’re clearing it, another process might be interfering.
Try adding a delay before clipboard operations:
Application.Wait (Now + TimeValue("0:00:01"))
Also, check for any Application.CutCopyMode = False or DoEvents that might be misbehaving.
3. Group Function Disabled on 'Total' Sheet
If grouping/collapsing stopped working:
• Check if outline symbols are hidden:
o Go to Data → Outline → Show Outline Symbols
• Ensure the sheet is not protected:
o Review → Unprotect Sheet
• Confirm that rows are grouped:
o Try manually grouping again (Data → Group)
• VBA might have disabled it:
ActiveSheet.DisplayOutline = True
Thanks Kidd_ip,
I will check those one by one if I can.
See you later