LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 94
Default Check range before pasting and modular approach questions

I am writing some utilities which I plan to bundle together in an add-in for
coworkers. Some of these utilities involve pasting information in
user-selected cells and others involve placing formulas in cells based on
userform input. In either case, I want to check the range prior to
pasting/inserting formulas.

Here is what I am planning to check and how:
- Is the selection a range?
- Is the selection a continuous range (using .Areas)?
- Does the selection contained locked/protected cells (using .AllowEdit)?
- Does the selection contain array formulas (using .HasArray)?
- Does the selection already contain something (using
WorksheetFunction.CountA)?

My questions:
1. Are there additional checks I need to make or any suggestions on the
methods I mentioned?
2. How should I 'arrange' these functions? I could create functions for
each of the checks, then call them from my main subroutine, I could create
one function with all of these checks and call that from my subroutine, or I
could create a function that calls on individual functions and call the one
function from my subroutine. I was planning to use the first option but as
I have just started 'modularizing' my code (versus the fourth option of
putting everything in the subroutine, which is what I used to do) I would
appreciate the opinion of others.

Sorry for the long post. Thanks in advance for your help.


 
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
Modular Arithmetic sirsoto Excel Programming 0 August 8th 06 01:11 AM
modular arithmetic sirsoto Excel Programming 1 July 22nd 05 07:41 AM
Macro - Modular fill function Chaz Excel Programming 3 July 6th 05 06:24 PM
Deleting blank rows in a range or another fill approach BigDave[_2_] Excel Programming 5 June 3rd 05 03:51 PM
2 questions about check boxes Tom S.[_2_] Excel Programming 1 October 11th 03 06:56 PM


All times are GMT +1. The time now is 07:06 PM.

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"