C
Carl Brehm
Why would
columncount = Range("Weekending").Cells.Columns.Count
return error 1004 (Method rage of object worksheet failed)?
Code is located on sheet1 activated by button
=EMBED("Forms.CommandButton.1","")
Private Sub Start_new_week_Click()
Dim monthdate As String
Dim columncount As Integer
monthdate = Application.InputBox("Week Ending Date", "Date", , , , , , 2)
'gets date of current week ends
Sheets("sheet1").Range("i4").Value = monthdate
Expand_Named_Range "Weekending", "right", 1
'expands named range one column
columncount = Range("Weekending").Cells.Columns.Count
'Counts number of colums in named range
With Range("weekending")
.Offset(0, columncount - 1).Value = monthdate
'assigns weekending date to column heading
'on Worksheet("vendor_totals")
End With
--
Carl Brehm
Lake Lafourche Bird House
Hebert, LA
Keets, Tiels, GN Lories, Quakers
Mitred Conures, TAG's, Bourkes
Lovebirds, Cherry Head Conures
Prince of Whales
Wholesale Cages to Breeders & Pet Stores
columncount = Range("Weekending").Cells.Columns.Count
return error 1004 (Method rage of object worksheet failed)?
Code is located on sheet1 activated by button
=EMBED("Forms.CommandButton.1","")
Private Sub Start_new_week_Click()
Dim monthdate As String
Dim columncount As Integer
monthdate = Application.InputBox("Week Ending Date", "Date", , , , , , 2)
'gets date of current week ends
Sheets("sheet1").Range("i4").Value = monthdate
Expand_Named_Range "Weekending", "right", 1
'expands named range one column
columncount = Range("Weekending").Cells.Columns.Count
'Counts number of colums in named range
With Range("weekending")
.Offset(0, columncount - 1).Value = monthdate
'assigns weekending date to column heading
'on Worksheet("vendor_totals")
End With
--
Carl Brehm
Lake Lafourche Bird House
Hebert, LA
Keets, Tiels, GN Lories, Quakers
Mitred Conures, TAG's, Bourkes
Lovebirds, Cherry Head Conures
Prince of Whales
Wholesale Cages to Breeders & Pet Stores