Home |
Search |
Today's Posts |
#13
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
These can get you started with macros...
http://www.bettersolutions.com/excel...R646543531.htm http://www.anthony-vba.kefra.com/ http://www.tushar-mehta.com/excel/vb...rder/index.htm The key to programming macros, after you get the basics down, is (in my opinion) to familiarize yourself with the various Objects and their Properties as well as the various Collection take Excel maintains. I'm not saying to memorize them, just read through them (and their descriptions) a few times so your mind has seen them... then when the opportunity to use one of them crops up, you might remember you saw something like it in the help files somewhere and you can then search it out. If you have never seen them, then it will be impossible for your mind to remember having seen them and the opportunity to use them will be lost. Like any other programming language, none of this will come overnight... you need to practice, practice, practice. And don't be afraid to make mistakes... trying to figure out why a piece of code that you thought should have worked, but didn't, is the best way to learn. -- Rick (MVP - Excel) "Still Learning" wrote in message ... Hey, I just got back to work and your macro worked perfectly. Maybe the reason was because I did type it instead of coping it. Can you recomned sites/books that will help me learn the codes for these macros? Thanks a whole lot, Chris "Rick Rothstein" wrote: I notice that I did not include the warning message box you mentioned about the active sheet not having any comments on it; here is my code, modified to show a message box when there are no comments on the active worksheet... Sub ShowCommentsNextCell() Dim C As Comment If ActiveSheet.Comments.Count 0 Then Application.ScreenUpdating = False For Each C In ActiveSheet.Comments With C.Parent.Offset(, 1) If .Value = "" Then .Value = C.Text End With Next Application.ScreenUpdating = True Else MsgBox "There are no comments on this sheet." End If End Sub -- Rick (MVP - Excel) "Rick Rothstein" wrote in message ... Give this macro a try; it is a little more compact than the one posted on Debra's website and it operates slightly differently also (no error checking is required with it)... Sub ShowCommentsNextCell() Dim C As Comment If ActiveSheet.Comments.Count 0 Then Application.ScreenUpdating = False For Each C In ActiveSheet.Comments With C.Parent.Offset(, 1) If .Value = "" Then .Value = C.Text End With Next Application.ScreenUpdating = True End If End Sub By the way, you should always copy/paste code from newsgroups and/or websites rather than typing them into the VB code windows (as your original post indicated you did). -- Rick (MVP - Excel) "Still Learning" <Still wrote in message ... No it is not. I'm assuming that the macro doesn't need anything typed into it (ie ranges (a1:b4) or sheet names or anythng). Thanks for trying to help. PS, is there somewhere that lists what these comands do? (as I said, I'm still learning) "Joshua Fandango" wrote: Community Message Not Available |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
coping of cell using dragging the cell downward or rightward | Excel Discussion (Misc queries) | |||
Coping part of a cell content into a seperate cell | Excel Discussion (Misc queries) | |||
Coping a Coloured cell | Excel Worksheet Functions | |||
coping formulas from one cell to another | Setting up and Configuration of Excel | |||
Coping Values - Not the cell | Excel Programming |