Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Run code based on cell contents

Hi,

I am stuck!!

Is there a piece of code that will allow a macro to run based on cel
contents.

For example i would like a piece of code to run and loop while th
value in cell A1 equals 1 But stop if the value equals 2.

Regards

Pet

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Run code based on cell contents

Thank you that was really useful to know, but is there a way i can ge
the code to run without attaching it to a button.

So if i type 1 into cell A1 and press enter the macro wil
automatically run?

Regards

Pet

--
Message posted from http://www.ExcelForum.com

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default Run code based on cell contents

Pete

Check out Event procedures at David McRitchie's site

http://www.mvps.org/dmcritchie/excel/event.htm

Or at Chip Pearson's site

http://www.cpearson.com/excel/events.htm

Event code will fire when you enter something(1 or 2) into A1

Gord Dibben Excel MVP

On Tue, 22 Jun 2004 11:17:19 -0500, Pete JM
wrote:

Thank you that was really useful to know, but is there a way i can get
the code to run without attaching it to a button.

So if i type 1 into cell A1 and press enter the macro will
automatically run?

Regards

Pete


---
Message posted from http://www.ExcelForum.com/


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
code to unhide tabs based on cell contents pat67 Excel Worksheet Functions 7 August 26th 11 12:43 AM
VBA code to copy cell contents from one sheet to another Gimp Excel Worksheet Functions 0 February 23rd 07 05:18 PM
Code to hide rows based on cell contents Tim[_29_] Excel Programming 5 December 17th 03 02:59 PM
How to validate in code the contents of a cell? Heather M. Excel Programming 1 November 11th 03 08:14 AM
run code after cell contents change Brian Excel Programming 0 September 5th 03 08:37 PM


All times are GMT +1. The time now is 03:50 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"