Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 102
Default Limit due to selected cells

G'morning,

I have a to-do-list in Excel consisting of 5 columns (A:E). Every new task
is on a new row. If needed I can create tasks in Outlook with the help of
commandbutton (which has code assigned to it that extracts the info I need to
the body of the task). What I would like to do now is to create an extra
statement (within the current statement) that states that if I'm not in a
cell in column D the code behind the commandbutton does not work (to prevent
faults or tasks that are unclear). Any help would be greatly appreciated.

Regards,

Basta 1980
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default Limit due to selected cells

Try

If ActiveCell.Column < 4 Then
'your current code
End If

OR place the below on top of your current procedure

If ActiveCell.Column = 4 Exit Sub


--
Jacob (MVP - Excel)


"Basta1980" wrote:

G'morning,

I have a to-do-list in Excel consisting of 5 columns (A:E). Every new task
is on a new row. If needed I can create tasks in Outlook with the help of
commandbutton (which has code assigned to it that extracts the info I need to
the body of the task). What I would like to do now is to create an extra
statement (within the current statement) that states that if I'm not in a
cell in column D the code behind the commandbutton does not work (to prevent
faults or tasks that are unclear). Any help would be greatly appreciated.

Regards,

Basta 1980

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 102
Default Limit due to selected cells

Jacob,

Thnx again. Works like a charm

Regards

Basta1980

"Jacob Skaria" wrote:

Try

If ActiveCell.Column < 4 Then
'your current code
End If

OR place the below on top of your current procedure

If ActiveCell.Column = 4 Exit Sub


--
Jacob (MVP - Excel)


"Basta1980" wrote:

G'morning,

I have a to-do-list in Excel consisting of 5 columns (A:E). Every new task
is on a new row. If needed I can create tasks in Outlook with the help of
commandbutton (which has code assigned to it that extracts the info I need to
the body of the task). What I would like to do now is to create an extra
statement (within the current statement) that states that if I'm not in a
cell in column D the code behind the commandbutton does not work (to prevent
faults or tasks that are unclear). Any help would be greatly appreciated.

Regards,

Basta 1980

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
Multiple cells or columns are selected instead of selected cell or Mikey Excel Discussion (Misc queries) 1 April 29th 09 09:48 PM
Adjustable Cells (Changing Cells) Limit - Solver Marcio Excel Discussion (Misc queries) 0 April 7th 08 04:41 PM
Cells are selected but aren't displayed as selected Nifty Excel Discussion (Misc queries) 2 September 17th 06 07:22 PM
Cells are selected but aren't displayed as selected Nifty Excel Worksheet Functions 0 September 17th 06 11:34 AM
Macro to take selected cells times a selected cell Craig Excel Programming 4 October 24th 05 12:54 AM


All times are GMT +1. The time now is 01:48 AM.

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

About Us

"It's about Microsoft Excel"