 | Senior Member with 227 posts. | | Join Date: Nov 2000 Location: Washington, DC | | need help writing a microsoft excel macro 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 | | Senior Member with 227 posts. | | Join Date: Nov 2000 Location: Washington, DC | | is this close? 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)" | | Distinguished Member with 8,052 posts. | | Join Date: Jun 2000 Location: American living in Dublin, Ireland Experience: Advanced | | 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.
__________________ Please let us know what answers your question, or fixes your problem.
Have you thought about donating to TSG??? No more ads, and help keep this site alive!!! Don't meddle in the affairs of dragons, for you are crunchy and taste good with ketchup!! | | Senior Member with 186 posts. | | Join Date: Oct 2001 Location: Southampton, England | | 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 | | Senior Member with 227 posts. | | Join Date: Nov 2000 Location: Washington, DC | | solved! 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 |  THIS THREAD HAS EXPIRED.
Are you having the same problem?
We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | |  WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.
| You Are Using: |
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 10:03 PM.
Copyright © 1996 - 2009 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd. Content Relevant URLs by vBSEO 3.2.0 | |
|