Click here to Skip to main content
15,887,337 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,
Am working in Automation of PPT Slides from Excel using VBA.I have more than 50 slides,and more than 100 tables.If I change values in Tables it should reflect in PPT slides.I have written code using ActiveCell like This

VB
Public Sub UpdatePPT_Click()
  Dim MyPath As String

  MyPath = InputBox("Enter the path")
  If Not Intersect(ActiveCell, Range("C145:D152")) Is Nothing Then
  Table7.updatetable7 (MyPath)
  End If
  If Not Intersect(ActiveCell, Range("C271:D273")) Is Nothing Then
  Table15_21.updatetable15 (MyPath)
  End If
  If Not Intersect(ActiveCell, Range("C283:X312")) Is Nothing Then
  Table15_21.updatetable16_18 (MyPath)
  End If
  End Sub


My issue is if I change one cell value in the Range("C145:D152") and another value in Range("C271:D273") ActiveCell takes the last range in which I Changed.But I want both the values Which gets changed in both ranges,How to solve this?


Thanks in Advance.
Posted
Updated 1-Dec-11 15:16pm
v4
Comments
[no name] 1-Dec-11 8:13am    
EDIT: added "pre" tag
[no name] 1-Dec-11 21:17pm    
EDIT: added "code" tag

1 solution

By definition, the ActiveCell is the currently active cell on the currently active work sheet. If you want to check for updates every time there is a modification, perhaps you should write your code in the work sheet Change event...

HTH
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900