PC Review


Reply
 
 
Laura \( '_' \)
Guest
Posts: n/a
 
      8th Dec 2005
Hiya Could someone explain what a macro is?? and how i would do one?? (any
example will do!)

Thanks

P.s.I can't access certain sites on the internet so please do not provide a
link.

)

--
@---}--
Laura.....
Liverpool, England

"Do you know where you're going to?"


 
Reply With Quote
 
 
 
 
Bob Phillips
Guest
Posts: n/a
 
      8th Dec 2005
Are you learning Excel in (very) small steps from the NGs? <G>

Normally I would direct you to David McRitchie's page, but I know what you
would say.

A macro is a VBA procedure that can perform an action, or a series of
actions. For instance, it can be a simple Hello World example

Sub Hello()
Msgbox "Hello World"
End Sub

or it can be slightly more complex, such as testing whether a cell have a
value and tell the caller

Sub TestValue()
If Range("A1").Value > 10 Then
Msgbox "Greater than 10"
End If
End Sub

And of course the complexity can get unlimited. Macros can call other
macros, they can pass variable values back and forth amongst each other.

One of the great strengths is that it can make changes to many cells,
something a worksheet function cannot do, or it can set formats, again of
many cells. Like formulae, IF(cond, do A,do B), it can react differently in
different circumstances.

And then you have Functions, similar, but they return a value, and whilst
they can be called from another macro, they can also be called from a
worksheet. So a simple function like

Function Laura(inVal)
If InVal > 100 Then
Laura = "Good score"
ElseIf InVal > 50 Then
Laura = "Average score"
Else
Laura = "Rubbish!"
End If
End Function

Then in a worksheet cell, type

=Laura(56)

and see what happens. Play with different values.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Laura ( '_' )" <(E-Mail Removed)> wrote in message
news:ux%23TrZB$(E-Mail Removed)...
> Hiya Could someone explain what a macro is?? and how i would do one?? (any
> example will do!)
>
> Thanks
>
> P.s.I can't access certain sites on the internet so please do not provide

a
> link.
>
> )
>
> --
> @---}--
> Laura.....
> Liverpool, England
>
> "Do you know where you're going to?"
>
>



 
Reply With Quote
 
Laura \( '_' \)
Guest
Posts: n/a
 
      9th Dec 2005
Hmm, right I see, Im gonna have to take this in VERY small steps to help me
understand all this.

Thanks very much for taking the time to reply such a detailed answer Bob!!

Big smiley for you! :0)))))))))))

--
@---}--
Laura.....
Liverpool, England

"Do you know where you're going to?"
"Bob Phillips" <(E-Mail Removed)> wrote in message
news:uGdkiiB$(E-Mail Removed)...
: Are you learning Excel in (very) small steps from the NGs? <G>
:
: Normally I would direct you to David McRitchie's page, but I know what you
: would say.
:
: A macro is a VBA procedure that can perform an action, or a series of
: actions. For instance, it can be a simple Hello World example
:
: Sub Hello()
: Msgbox "Hello World"
: End Sub
:
: or it can be slightly more complex, such as testing whether a cell have a
: value and tell the caller
:
: Sub TestValue()
: If Range("A1").Value > 10 Then
: Msgbox "Greater than 10"
: End If
: End Sub
:
: And of course the complexity can get unlimited. Macros can call other
: macros, they can pass variable values back and forth amongst each other.
:
: One of the great strengths is that it can make changes to many cells,
: something a worksheet function cannot do, or it can set formats, again of
: many cells. Like formulae, IF(cond, do A,do B), it can react differently
in
: different circumstances.
:
: And then you have Functions, similar, but they return a value, and whilst
: they can be called from another macro, they can also be called from a
: worksheet. So a simple function like
:
: Function Laura(inVal)
: If InVal > 100 Then
: Laura = "Good score"
: ElseIf InVal > 50 Then
: Laura = "Average score"
: Else
: Laura = "Rubbish!"
: End If
: End Function
:
: Then in a worksheet cell, type
:
: =Laura(56)
:
: and see what happens. Play with different values.
:
: --
:
: HTH
:
: RP
: (remove nothere from the email address if mailing direct)
:
:
: "Laura ( '_' )" <(E-Mail Removed)> wrote in message
: news:ux%23TrZB$(E-Mail Removed)...
: > Hiya Could someone explain what a macro is?? and how i would do one??
(any
: > example will do!)
: >
: > Thanks
: >
: > P.s.I can't access certain sites on the internet so please do not
provide
: a
: > link.
: >
: > )
: >
: > --
: > @---}--
: > Laura.....
: > Liverpool, England
: >
: > "Do you know where you're going to?"
: >
: >
:
:


 
Reply With Quote
 
Jason
Guest
Posts: n/a
 
      9th Dec 2005
For me, a good way to learn about macros in Excel has been to use the
macro recorder. Here's how:

1. On the Excel toolbar, click Tools, Macro, Record New Macro. A
dialog box will open.
2. Assign a name and click ok. A small toolbar should open up.
Ignore that for the moment.
3. In the spreadsheet, make a few changes. Select a new cell, type in
your name, change the color of the background, select another cell,
etc.
4. Now, on the little toolbar that opened, click the button with a
picture of a square.
5. Delete the values you just typed and change the format changes you
made.
6. Press Alt + F8. The macro dialog box will open.
7. Select the name that you just saved and click Run.
8. The macro will repeat the actions that you recorded.

Note: In step 2, if you select "This Workbook" the drop down box
labeled "Store this macro in:", you won't be able to use the macro in
other workbooks.

Another note: If you'd like to look at the vba behind the macro, press
Alt + F11 to open the VBE.

Hope this helps.

 
Reply With Quote
 
Laura \( '_' \)
Guest
Posts: n/a
 
      12th Dec 2005
Thankyou Jason, that actually helped me a lot!!
Im learning slowly )

--
@---}--
Laura.....
Liverpool, England

"Do you know where you're going to?"
"Jason" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
: For me, a good way to learn about macros in Excel has been to use the
: macro recorder. Here's how:
:
: 1. On the Excel toolbar, click Tools, Macro, Record New Macro. A
: dialog box will open.
: 2. Assign a name and click ok. A small toolbar should open up.
: Ignore that for the moment.
: 3. In the spreadsheet, make a few changes. Select a new cell, type in
: your name, change the color of the background, select another cell,
: etc.
: 4. Now, on the little toolbar that opened, click the button with a
: picture of a square.
: 5. Delete the values you just typed and change the format changes you
: made.
: 6. Press Alt + F8. The macro dialog box will open.
: 7. Select the name that you just saved and click Run.
: 8. The macro will repeat the actions that you recorded.
:
: Note: In step 2, if you select "This Workbook" the drop down box
: labeled "Store this macro in:", you won't be able to use the macro in
: other workbooks.
:
: Another note: If you'd like to look at the vba behind the macro, press
: Alt + F11 to open the VBE.
:
: Hope this helps.
:


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macros in Personal.xls that would create two toolbars and buttonswith assigned macros =?Utf-8?B?SmF5?= Microsoft Excel Programming 1 30th Mar 2007 01:02 AM
choose default macros Not Enabled / Macros Enable Setting =?Utf-8?B?QkVFSkFZ?= Microsoft Excel Programming 2 30th Jun 2006 02:07 PM
weird saving of a document with macros resulting with macros being transfered to the copy alfonso gonzales Microsoft Excel Programming 0 12th Dec 2004 10:19 PM
Removing Excel message to enable macros or disable macros =?Utf-8?B?Ym1pbGxlcjI2Mw==?= Microsoft Excel Misc 2 13th Oct 2004 03:39 PM
Re: The macros in this project are disabled. Please refer to the online help or documentation of the host application to determine how to enable macros. Sue Mosher [MVP-Outlook] Microsoft Outlook Installation 0 17th Feb 2004 06:29 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:21 AM.