Excel VBA Programming Code Problem?

I am having some trouble getting this VBA code to work. I am a bit new to VBA, but have some very basic programming knowledge as far as if then else statements are concerned. What I'd like to have happen is for Excel to figure out how many days have elapsed between today and the last time this code was run, and... show more I am having some trouble getting this VBA code to work. I am a bit new to VBA, but have some very basic programming knowledge as far as if then else statements are concerned. What I'd like to have happen is for Excel to figure out how many days have elapsed between today and the last time this code was run, and to insert one row per day elapsed. Here is what I have so far:

Option Explicit

Sub Insert_Rows()

Dim x As Date
Dim y As Long
Dim z As Long

x = Date
y = Sheets("Sheet1").Cells(2, 1)
z = DateDiff("d", x, y) + 1

Rows("z:2").Select
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove

End Sub

Any ideas or suggestions would be greatly appreciated. Tips are great too. Also: what does "VBA" stand for? I've seen several webpages about VBA mentioned with C++ and other programming languages. I guess It'd be cool to know where the heck this thing came from and the limits of its capabilities.

Bob
2 answers 2