Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello, thank you for helping in advance..
i have a couple of macros that was i was working on and was helped ( alot).. i am currently reading a excel step by step book by reed jacobson and i am learning the term adn properties as i go along here. Will anyone be willing to decipher and explain each statement in "idiot" terms so i can see how it actually worked and understand it? i find it fascinating to do macros. I would be thrilled if anyone can break these down. again thanks you for helping. mike Sub copy_to_sheet() copy_to = "Month" & Range("month_val").Value last_used = Sheets(copy_to).Cells.SpecialCells _ (xlCellTypeLastCell).Address copy_to_address = Rows(Sheets(copy_to).Range _ (last_used).Row + 2).Columns(1).Address If copy_to_address = "$A$3" Then copy_to_address = "$A$1" Sheets("form").Range("form_data").Copy Destination:=Sheets (copy_to).Range(copy_to_address) End Sub and... Private Sub Worksheet_Change(ByVal Target As Range) this_month = 1 dd = Range("start_date").Value Do While dd < Range("ref_date").Value dd = 1 + dd If Day(dd) = 25 Then this_month = 1 + this_month Loop Range("month_val").Value = this_month End Sub **what did the argument in paratheses mean? "(ByVal Target As Range)" and "this_month = 1 ..What is this "statement" telling Excel? thanks!!! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
split post code (zip code) out of cell that includes full address | Excel Discussion (Misc queries) | |||
Code to conditional format all black after date specified in code? | Excel Discussion (Misc queries) | |||
Drop Down/List w/Code and Definition, only code entered when selec | Excel Worksheet Functions | |||
VBA code delete code but ask for password and unlock VBA protection | Excel Programming | |||
Help 'splain unusual behavior in simple procedure | Excel Programming |