LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default 'splain the code please :)

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
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
split post code (zip code) out of cell that includes full address Concord Excel Discussion (Misc queries) 4 October 15th 09 06:59 PM
Code to conditional format all black after date specified in code? wx4usa Excel Discussion (Misc queries) 3 December 26th 08 07:06 PM
Drop Down/List w/Code and Definition, only code entered when selec Spiritdancer Excel Worksheet Functions 2 November 2nd 07 03:57 AM
VBA code delete code but ask for password and unlock VBA protection WashoeJeff Excel Programming 0 January 27th 04 07:07 AM
Help 'splain unusual behavior in simple procedure tod Excel Programming 0 January 13th 04 11:13 PM


All times are GMT +1. The time now is 01:03 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"