View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default Pause recorded macro for user selection of menu option

Here is an exaple that you may be able to adapt. Say we have a macro that at
some point needs the users to supply data in A1 and B1 and C1.

We want the macro to tell the user to puts values in A1, B1, and C1 and then
wait until all three cells are filled.

Once all three cells are filled, the macro should proceed.

Sub WaitForEntry()
MsgBox ("Please fill A1, B1, and C1")
Set r = Range("A1:C1")
While Application.WorksheetFunction.Count(r) < 3
DoEvents
Wend
MsgBox ("Thank you")
End Sub

The DoEvents allows the user and the macro to share focus.
--
Gary''s Student - gsnu200832


"Steve Gibbs" wrote:

I have a macro that creates a series of validation lists. Since I need to
create about 100 forms with 10 to 20 validation list each. I would really
like my macro to do more. I create a series of range names, then I need to
use them in my validation lists. My macro selects "Data", "Validation",
"List", places an "=" in the box, then selects "Insert", "Name", "Paste".
Then I need to select the appropriate name from the list of range names, but
I don't know how to modify the macro to allow for this selection. I have
searched my books and cannot find an answer. I have started to study VBA but
I need this this week if possible and I'm not ready to write the code. I
would really appreciate some help. Thanks