Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Running a macro if a cell contains number 1

I have a macro that I activates if I click on a check box. It copies rows,
Can someone please give me the additional code I need at the start so the
macro only runs if the content of a specified cell in the Testing Combined
sheet is 1.

The code I have so far is
Sheets("Skills Required").Select
Rows("63:65").Select
Selection.EntireRow.Hidden = False
Sheets("Testing Combined").Select
Range("D159").Select
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Running a macro if a cell contains number 1

If Range("D159").Value < 1 Then
Exit Sub
End If
--
Gary's Student
gsnu200711


"Aidan" wrote:

I have a macro that I activates if I click on a check box. It copies rows,
Can someone please give me the additional code I need at the start so the
macro only runs if the content of a specified cell in the Testing Combined
sheet is 1.

The code I have so far is
Sheets("Skills Required").Select
Rows("63:65").Select
Selection.EntireRow.Hidden = False
Sheets("Testing Combined").Select
Range("D159").Select

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Running macro from currently selected cell? GD Excel Discussion (Misc queries) 1 February 10th 09 04:54 PM
Running Macro when a cell value changes Ayo Excel Discussion (Misc queries) 1 April 18th 07 03:09 PM
Running a Macro a number of times JWF Excel Discussion (Misc queries) 2 March 14th 06 11:10 AM
running a macro when a certain cell changes Jeffreak Excel Programming 0 October 6th 05 03:09 PM
Running a macro when a cell value changes Emea training[_2_] Excel Programming 3 August 1st 04 03:07 PM


All times are GMT +1. The time now is 04:39 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"