Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
When I run this click macro from inside a worksheet, nothing happens. The
changes I am trying to make are not done but the code works fine when I run it manually. Any ideas what is going wrong? Private Sub cmdMarketRegion_Click() If Me.cmdMarketRegion.Caption = "Market" Then Me.cmdMarketRegion.Caption = "Region" Me.Range("D7,D23,D39") = "Market" Me.Cells.Select With Selection .Replace What:="=$D$7", Replacement:="<""" End With Me.Range("A2").Select ElseIf Me.cmdMarketRegion.Caption = "Region" Then Me.cmdMarketRegion.Caption = "Market" Me.Range("D7,D23,D39") = "Region" Me.Cells.Select With Selection .Replace What:="--('InSite Milestones'!$A$2:$A$9245=$E$4)", Replacement:="--('InSite Milestones'!$A$2:$A$9245<"")" End With Me.Range("A2").Select End If Me.Calculate End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Selection.Replace Problem | Excel Discussion (Misc queries) | |||
Selection.Replace What and double quotes | Excel Programming | |||
Selection.Replace size limitation | Excel Programming | |||
Excel: Add replace within selection functionality | Excel Discussion (Misc queries) | |||
Replace Values in range selection | Excel Programming |