#1   Report Post  
Posted to microsoft.public.excel.newusers
d_kight
 
Posts: n/a
Default macro

I am pretty new to using (or attempting to use) a Macro in a workbook. I am
having trouble following how and what to do to even start the process; ie If
there needs to be a worksheet already in progress or can I start from a new
sheet.
THEN where to go from there.
Can I have some help in this area? Can some one supply me with a sample
MACRO?

Any help would be greatly appreciated

Dan
  #2   Report Post  
Posted to microsoft.public.excel.newusers
Chip Pearson
 
Posts: n/a
Default macro

The best way to get started with macros is to use the Macro
Recorder. Go to the Tools menu, choose Macros, then Record New
Macro. Then, carry out some simple tasks and examine the code
that is produced.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"d_kight" wrote in message
...
I am pretty new to using (or attempting to use) a Macro in a
workbook. I am
having trouble following how and what to do to even start the
process; ie If
there needs to be a worksheet already in progress or can I
start from a new
sheet.
THEN where to go from there.
Can I have some help in this area? Can some one supply me with
a sample
MACRO?

Any help would be greatly appreciated

Dan



  #3   Report Post  
Posted to microsoft.public.excel.newusers
CLR
 
Posts: n/a
Default macro

Check out these sites as a good place to start.........
www.cpearson.com
http://www.mcgimpsey.com/excel/index.html#usingvba
http://www.mvps.org/dmcritchie/excel/excel.htm

hth
Vaya con Dios,
Chuck, CABGx3



"d_kight" wrote:

I am pretty new to using (or attempting to use) a Macro in a workbook. I am
having trouble following how and what to do to even start the process; ie If
there needs to be a worksheet already in progress or can I start from a new
sheet.
THEN where to go from there.
Can I have some help in this area? Can some one supply me with a sample
MACRO?

Any help would be greatly appreciated

Dan

  #4   Report Post  
Posted to microsoft.public.excel.newusers
d_kight
 
Posts: n/a
Default macro

Wow, Thanks you guys!The sites and the recorder information seem like they
will do the trick for me learning to use macros. I will give tha ta go.

Dan

"CLR" wrote:

Check out these sites as a good place to start.........
www.cpearson.com
http://www.mcgimpsey.com/excel/index.html#usingvba
http://www.mvps.org/dmcritchie/excel/excel.htm

hth
Vaya con Dios,
Chuck, CABGx3



"d_kight" wrote:

I am pretty new to using (or attempting to use) a Macro in a workbook. I am
having trouble following how and what to do to even start the process; ie If
there needs to be a worksheet already in progress or can I start from a new
sheet.
THEN where to go from there.
Can I have some help in this area? Can some one supply me with a sample
MACRO?

Any help would be greatly appreciated

Dan

  #5   Report Post  
Posted to microsoft.public.excel.newusers
d_kight
 
Posts: n/a
Default macro

OK How about this error:
I have tried an example of using a macro to find the area of rectangle. I
made a function called area and here is the syntax I used in the Module:
Function Area(Length as Double, Width as Double)
Area = Length * Width
End Function

Then when I go to a worksheet, and place 17 in cell A1 and 10 in cell B1 and
in C1 type in =Area(A1,B1) I expect to get 170, but I get 0

Am I missing something??
Please help.
Dan

"CLR" wrote:

Check out these sites as a good place to start.........
www.cpearson.com
http://www.mcgimpsey.com/excel/index.html#usingvba
http://www.mvps.org/dmcritchie/excel/excel.htm

hth
Vaya con Dios,
Chuck, CABGx3



"d_kight" wrote:

I am pretty new to using (or attempting to use) a Macro in a workbook. I am
having trouble following how and what to do to even start the process; ie If
there needs to be a worksheet already in progress or can I start from a new
sheet.
THEN where to go from there.
Can I have some help in this area? Can some one supply me with a sample
MACRO?

Any help would be greatly appreciated

Dan



  #6   Report Post  
Posted to microsoft.public.excel.newusers
Dave Peterson
 
Posts: n/a
Default macro

Make sure calculation is set to automatic.
tools|options|calculation tab

And make sure you put the values in A1 and B1 and your function uses
=area(a1,b1).

(I'm suspecting that you didn't put the values in A1 and B1.)


d_kight wrote:

OK How about this error:
I have tried an example of using a macro to find the area of rectangle. I
made a function called area and here is the syntax I used in the Module:
Function Area(Length as Double, Width as Double)
Area = Length * Width
End Function

Then when I go to a worksheet, and place 17 in cell A1 and 10 in cell B1 and
in C1 type in =Area(A1,B1) I expect to get 170, but I get 0

Am I missing something??
Please help.
Dan

"CLR" wrote:

Check out these sites as a good place to start.........
www.cpearson.com
http://www.mcgimpsey.com/excel/index.html#usingvba
http://www.mvps.org/dmcritchie/excel/excel.htm

hth
Vaya con Dios,
Chuck, CABGx3



"d_kight" wrote:

I am pretty new to using (or attempting to use) a Macro in a workbook. I am
having trouble following how and what to do to even start the process; ie If
there needs to be a worksheet already in progress or can I start from a new
sheet.
THEN where to go from there.
Can I have some help in this area? Can some one supply me with a sample
MACRO?

Any help would be greatly appreciated

Dan


--

Dave Peterson
  #7   Report Post  
Posted to microsoft.public.excel.newusers
d_kight
 
Posts: n/a
Default macro

Thanks dave BUT I have (or had) done everything that you mentioned and it did
not work correctly for me; like put the values in A1 and B1, the calculation
is set to auto, and the function is =area(a1,b1), I even started over. I
also put that formula in c1 and the result I was given was 0. try it the
exact way I did and see if you get the same results (to show I am not loosing
it entirely).
Does capitalization matter?
Thanks for the response, Dave and let me know the results.
"Dave Peterson" wrote:

Make sure calculation is set to automatic.
tools|options|calculation tab

And make sure you put the values in A1 and B1 and your function uses
=area(a1,b1).

(I'm suspecting that you didn't put the values in A1 and B1.)


d_kight wrote:

OK How about this error:
I have tried an example of using a macro to find the area of rectangle. I
made a function called area and here is the syntax I used in the Module:
Function Area(Length as Double, Width as Double)
Area = Length * Width
End Function

Then when I go to a worksheet, and place 17 in cell A1 and 10 in cell B1 and
in C1 type in =Area(A1,B1) I expect to get 170, but I get 0

Am I missing something??
Please help.
Dan

"CLR" wrote:

Check out these sites as a good place to start.........
www.cpearson.com
http://www.mcgimpsey.com/excel/index.html#usingvba
http://www.mvps.org/dmcritchie/excel/excel.htm

hth
Vaya con Dios,
Chuck, CABGx3



"d_kight" wrote:

I am pretty new to using (or attempting to use) a Macro in a workbook. I am
having trouble following how and what to do to even start the process; ie If
there needs to be a worksheet already in progress or can I start from a new
sheet.
THEN where to go from there.
Can I have some help in this area? Can some one supply me with a sample
MACRO?

Any help would be greatly appreciated

Dan


--

Dave Peterson

  #8   Report Post  
Posted to microsoft.public.excel.newusers
d_kight
 
Posts: n/a
Default macro

Hey Guys! it worked, I had a slight Typo. Look at me looking silly.
Thanks. Now on to some more complicated functions.



"Chip Pearson" wrote:

The best way to get started with macros is to use the Macro
Recorder. Go to the Tools menu, choose Macros, then Record New
Macro. Then, carry out some simple tasks and examine the code
that is produced.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"d_kight" wrote in message
...
I am pretty new to using (or attempting to use) a Macro in a
workbook. I am
having trouble following how and what to do to even start the
process; ie If
there needs to be a worksheet already in progress or can I
start from a new
sheet.
THEN where to go from there.
Can I have some help in this area? Can some one supply me with
a sample
MACRO?

Any help would be greatly appreciated

Dan




  #9   Report Post  
Posted to microsoft.public.excel.newusers
Gord Dibben
 
Posts: n/a
Default macro

I tested your UDF and followed your steps as below.

C1 returns 170 or any other value depending upon A1 and B1 values.

Capitalization does not matter.

=Area(a1,b1) is good as well as =area(a1,b1)


Gord Dibben MS Excel MVP

On Tue, 27 Jun 2006 10:53:02 -0700, d_kight
wrote:

Thanks dave BUT I have (or had) done everything that you mentioned and it did
not work correctly for me; like put the values in A1 and B1, the calculation
is set to auto, and the function is =area(a1,b1), I even started over. I
also put that formula in c1 and the result I was given was 0. try it the
exact way I did and see if you get the same results (to show I am not loosing
it entirely).
Does capitalization matter?
Thanks for the response, Dave and let me know the results.
"Dave Peterson" wrote:

Make sure calculation is set to automatic.
tools|options|calculation tab

And make sure you put the values in A1 and B1 and your function uses
=area(a1,b1).

(I'm suspecting that you didn't put the values in A1 and B1.)


d_kight wrote:

OK How about this error:
I have tried an example of using a macro to find the area of rectangle. I
made a function called area and here is the syntax I used in the Module:
Function Area(Length as Double, Width as Double)
Area = Length * Width
End Function

Then when I go to a worksheet, and place 17 in cell A1 and 10 in cell B1 and
in C1 type in =Area(A1,B1) I expect to get 170, but I get 0

Am I missing something??
Please help.
Dan

"CLR" wrote:

Check out these sites as a good place to start.........
www.cpearson.com
http://www.mcgimpsey.com/excel/index.html#usingvba
http://www.mvps.org/dmcritchie/excel/excel.htm

hth
Vaya con Dios,
Chuck, CABGx3



"d_kight" wrote:

I am pretty new to using (or attempting to use) a Macro in a workbook. I am
having trouble following how and what to do to even start the process; ie If
there needs to be a worksheet already in progress or can I start from a new
sheet.
THEN where to go from there.
Can I have some help in this area? Can some one supply me with a sample
MACRO?

Any help would be greatly appreciated

Dan


--

Dave Peterson


  #10   Report Post  
Posted to microsoft.public.excel.newusers
Dave Peterson
 
Posts: n/a
Default macro

The only way I got 0 is if one of the cells (or both) I pointed at was 0.

Everytime I used it, it worked fine.

d_kight wrote:

Thanks dave BUT I have (or had) done everything that you mentioned and it did
not work correctly for me; like put the values in A1 and B1, the calculation
is set to auto, and the function is =area(a1,b1), I even started over. I
also put that formula in c1 and the result I was given was 0. try it the
exact way I did and see if you get the same results (to show I am not loosing
it entirely).
Does capitalization matter?
Thanks for the response, Dave and let me know the results.
"Dave Peterson" wrote:

Make sure calculation is set to automatic.
tools|options|calculation tab

And make sure you put the values in A1 and B1 and your function uses
=area(a1,b1).

(I'm suspecting that you didn't put the values in A1 and B1.)


d_kight wrote:

OK How about this error:
I have tried an example of using a macro to find the area of rectangle. I
made a function called area and here is the syntax I used in the Module:
Function Area(Length as Double, Width as Double)
Area = Length * Width
End Function

Then when I go to a worksheet, and place 17 in cell A1 and 10 in cell B1 and
in C1 type in =Area(A1,B1) I expect to get 170, but I get 0

Am I missing something??
Please help.
Dan

"CLR" wrote:

Check out these sites as a good place to start.........
www.cpearson.com
http://www.mcgimpsey.com/excel/index.html#usingvba
http://www.mvps.org/dmcritchie/excel/excel.htm

hth
Vaya con Dios,
Chuck, CABGx3



"d_kight" wrote:

I am pretty new to using (or attempting to use) a Macro in a workbook. I am
having trouble following how and what to do to even start the process; ie If
there needs to be a worksheet already in progress or can I start from a new
sheet.
THEN where to go from there.
Can I have some help in this area? Can some one supply me with a sample
MACRO?

Any help would be greatly appreciated

Dan


--

Dave Peterson


--

Dave Peterson


  #11   Report Post  
Posted to microsoft.public.excel.newusers
JLatham
 
Posts: n/a
Default macro

I'm a little late to the party. But I thought I'd offer one more source.
This page gives links to instructions for inserting general purpose VBA code,
VBA code tied to a worksheet event and VBA code tied to workbook events.
Thought it might help you in your learning:
http://www.jlathamsite.com/LearningPage.htm

"d_kight" wrote:

I am pretty new to using (or attempting to use) a Macro in a workbook. I am
having trouble following how and what to do to even start the process; ie If
there needs to be a worksheet already in progress or can I start from a new
sheet.
THEN where to go from there.
Can I have some help in this area? Can some one supply me with a sample
MACRO?

Any help would be greatly appreciated

Dan

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
Search, Copy, Paste Macro in Excel [email protected] Excel Worksheet Functions 0 January 3rd 06 06:51 PM
Closing File Error jcliquidtension Excel Discussion (Misc queries) 4 October 20th 05 12:22 PM
macro with F9 Kenny Excel Discussion (Misc queries) 1 August 3rd 05 02:41 PM
Make Alignment options under format cells available as shortcut dforrest Excel Discussion (Misc queries) 1 July 14th 05 10:58 PM
Playing a macro from another workbook Jim Excel Discussion (Misc queries) 1 February 23rd 05 10:12 PM


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