Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Pause a macro to allow editing of a worksheet


Hello All,

The problem: I want to pause a macro to allow editing of a few cells on
a worksheet.

How do I stop the macro to allow me to work on the currently selected
sheet, and then have the macro continue when I am finished entering
data???


Any help would be greatly appreciated!!!!!


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/

~~Now Available: Financial Statements.xls, a step by step guide to creating financial statements
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default Pause a macro to allow editing of a worksheet

Captain,

Either use two macros, one for before and one for after editing, or
incorporate your editing into the macro by setting cell values equal
to the returned value from an inputbox, or you could loop through a
section of code that shows a userform with a refedit and a textbox to
get input and assign it a user-selected cell.

HTH,
Bernie
MS Excel MVP

"captbluefin" wrote in
message ...

Hello All,

The problem: I want to pause a macro to allow editing of a few cells

on
a worksheet.

How do I stop the macro to allow me to work on the currently

selected
sheet, and then have the macro continue when I am finished entering
data???


Any help would be greatly appreciated!!!!!


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from

http://www.ExcelForum.com/

~~Now Available: Financial Statements.xls, a step by step guide to

creating financial statements


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default Pause a macro to allow editing of a worksheet

By using the ontime method you can pause your macro.
what i did was if I selected cells A1 then my macro put the word "Hello" in
the range, then it paused for 20 seconds. I typed in other cells, then when
the macro resumed it called a module to change the range to the word
"Worked". Of course you could just end your macro at the point you need to
enter your data then resume it afterwards. The problem with using my method
is that if you don't have the pause time correct then it will resume before
you are done entering your data. But this will give you an option.

Dim rng As Range
Set rng = Range("a2:c6")
If ActiveCell = Cells(1, 1) Then
rng.Value = "Hello"
Application.OnTime Now + TimeValue("00:00:20"), "enable_resume"
End If

Private Sub enable_resume()
Dim rng As Range
Set rng = Range("A2:C6")
rng.Value = "Worked"
End Sub

HTH
"captbluefin" wrote in message
...

Hello All,

The problem: I want to pause a macro to allow editing of a few cells on
a worksheet.

How do I stop the macro to allow me to work on the currently selected
sheet, and then have the macro continue when I am finished entering
data???


Any help would be greatly appreciated!!!!!


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/

~~Now Available: Financial Statements.xls, a step by step guide to

creating financial statements


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
pause a macro tsmith Excel Discussion (Misc queries) 9 January 22nd 09 12:47 AM
How do I pause a macro? Dave H Excel Discussion (Misc queries) 5 May 3rd 08 04:53 PM
Pause Macro 2 Ollie Excel Discussion (Misc queries) 3 June 15th 06 04:49 AM
VB Scripting/Macro - Filling/Editing Worksheet References Meghan New Users to Excel 2 December 16th 04 05:55 PM
Pause macro Bill Barclift Excel Programming 0 September 30th 03 09:22 PM


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