Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
lee
 
Posts: n/a
Default How do I pause a macro to select specific cells

I am using version Excel 2003 - I need to be able to pause a macro to allow
me to select specific cells (which will be different each time I use the
macro) then continue to run the rest of the macro.
  #2   Report Post  
Dave Peterson
 
Posts: n/a
Default

You could use application.inputbox()

As in:

dim myRng as range

set myrng = nothing
on error resume next
set myrng = application.inputbox("Select a range", type:=8)
on error goto 0

if myrng is nothing then
'user hit cancel
'what happens here
else
msgbox myrng.address 'do what you want
end if

lee wrote:

I am using version Excel 2003 - I need to be able to pause a macro to allow
me to select specific cells (which will be different each time I use the
macro) then continue to run the rest of the macro.


--

Dave Peterson
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
Protecting specific cells in a worksheet. GaryS Excel Worksheet Functions 2 January 6th 05 04:47 PM
how can i select all the cells with same color on a sheet if there are multipale colors by vba code uobt Charts and Charting in Excel 1 December 15th 04 05:27 PM
Protected cells -automatically format to a different color Fred Evans Excel Discussion (Misc queries) 9 December 3rd 04 12:59 PM
select worksheet to run macro Hidaya Excel Discussion (Misc queries) 5 December 1st 04 11:54 PM
Sum of specific cells Daniel Excel Worksheet Functions 5 November 21st 04 02:44 PM


All times are GMT +1. The time now is 12:09 PM.

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"