# need help writing a microsoft excel macro



## SabreWolf3

Hi gurus,

Help me score some points with my boss, please. I created a spreadsheet to keep a schedule of meetings for a conference room. I used a formula to automatically populate the correct dates for Monday - Friday of each week (only the current 5-day work week is displayed).

I have no idea how to write VB syntax, so I need some help. Will anyone help me? This is what I need. 

When someone pushes a button, which we'll call button 1, I need a macro to do this. I'll figure out the rest....

Set cell B7 = cell B8
Set cell C7 = cell C8
Set cell D7 = cell D8
Set cell E7 = cell E8
Set cell F7 = cell F8

I'd really appreciate it! I'll figure out how to modify this macro to suit my other needs, I just need a starting point!

Thanks,

Richard


----------



## SabreWolf3

I found this on a web page somewhere, and it looked easy enough, but I can't seem to get it to work correctly. It is giving me a syntax error, any suggestions?

Range("B1")Formula = "(insert formula here)"


----------



## RandyG

Hey SabreWolf3,

Have you tried the Record Macro feature? I am not a VB hound either, but what I do is go to Tools, Macro, Record New Macro. Give it a name (remember no spaces), assign a shortcut key if you want, then click OK. You should see a Macro button that looks like the Stop button on a media player. From this point on, all mouse clicks and keyboard strokes are recorded. Dop the operation you want the macro to perform, and when you are finished, click the stop button. It will even open up other documents, pull info from them, and close them back down.

I am using Excel 2000, BTW. Once you have recorded the Macro, you can edit it by going back to Tools.


----------



## TimCottee

You need to use the following methods:

With ActiveSheet
.Range("C7").Value = .Range("C8").Value
.Range("D7").Value = .Range("D8").Value
.Range("E7").Value = .Range("E8").Value
.Range("F7").Value = .Range("F8").Value
End With


----------



## SabreWolf3

Thanks Randy and Tim... 

I got my problem figured out. I almost had it right yesterday, but I was missing a few characters in my syntax. 

Regards,

Richard


----------

