ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Macro To Make Workbook Demonstrate Itself (https://www.excelbanter.com/excel-worksheet-functions/195097-macro-make-workbook-demonstrate-itself.html)

robzrob

Macro To Make Workbook Demonstrate Itself
 
I want to set up a macro which will perform various actions - mostly
simple, like typing this, that or the other into cells, deleting cell
entries, etc. I'm a complete beginner with VBA, so I want to do the
macro by recording, for example:

ActiveCell.FormulaR1C1 = "a"
Range("C7").Select
ActiveCell.FormulaR1C1 = "b"
Range("C8").Select
ActiveCell.FormulaR1C1 = "c"
Range("C9").Select
ActiveCell.FormulaR1C1 = "d"
Range("C10").Select
ActiveCell.FormulaR1C1 = "e"
Range("C11").Select

What I'd like to do after I've recorded it (eg as above) is insert
pauses and make message boxes appear and disappear at various places
and times. Can anybody tell me how?

Bob Phillips

Macro To Make Workbook Demonstrate Itself
 
MsgBox "We will start by doing something", vbOKOnly, "Excel demo"
Range("C6").Value = "a"
Range("C7").Value = "b"
Range("C8").Value = "c"
MsgBox "Now we do something else", vbOKOnly, "Excel demo"
Range("C9").Value = "d"
Range("C10").Value = "e"
'etc


--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"robzrob" wrote in message
...
I want to set up a macro which will perform various actions - mostly
simple, like typing this, that or the other into cells, deleting cell
entries, etc. I'm a complete beginner with VBA, so I want to do the
macro by recording, for example:

ActiveCell.FormulaR1C1 = "a"
Range("C7").Select
ActiveCell.FormulaR1C1 = "b"
Range("C8").Select
ActiveCell.FormulaR1C1 = "c"
Range("C9").Select
ActiveCell.FormulaR1C1 = "d"
Range("C10").Select
ActiveCell.FormulaR1C1 = "e"
Range("C11").Select

What I'd like to do after I've recorded it (eg as above) is insert
pauses and make message boxes appear and disappear at various places
and times. Can anybody tell me how?




robzrob

Macro To Make Workbook Demonstrate Itself
 
On Jul 16, 12:54*pm, "Bob Phillips" wrote:
* * MsgBox "We will start by doing something", vbOKOnly, "Excel demo"
* * Range("C6").Value = "a"
* * Range("C7").Value = "b"
* * Range("C8").Value = "c"
* * MsgBox "Now we do something else", vbOKOnly, "Excel demo"
* * Range("C9").Value = "d"
* * Range("C10").Value = "e"
* * 'etc

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"robzrob" wrote in message

...



I want to set up a macro which will perform various actions - mostly
simple, like typing this, that or the other into cells, deleting cell
entries, etc. *I'm a complete beginner with VBA, so I want to do the
macro by recording, for example:


* *ActiveCell.FormulaR1C1 = "a"
* *Range("C7").Select
* *ActiveCell.FormulaR1C1 = "b"
* *Range("C8").Select
* *ActiveCell.FormulaR1C1 = "c"
* *Range("C9").Select
* *ActiveCell.FormulaR1C1 = "d"
* *Range("C10").Select
* *ActiveCell.FormulaR1C1 = "e"
* *Range("C11").Select


What I'd like to do after I've recorded it (eg as above) is insert
pauses and make message boxes appear and disappear at various places
and times. *Can anybody tell me how?- Hide quoted text -


- Show quoted text -


Thanks Bob, that'll give me something to play with.


All times are GMT +1. The time now is 10:42 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com