LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default Array - Object required???

thank you to all who looked at this - yes Paul you were right - taking
out the .Value made it work




completed code:


Sub AA_updateSalaries()

Dim i, j, k, m As Integer
Dim c
Dim strCC, sOut As String

Dim iFileNum As Integer
Dim lRowCount As Long
Dim lRow As Long
Dim iColCount As Integer
Dim iCol As Integer
Dim Arr()


Worksheets("Salaries").Select

Sheets("SRD").Select
Range("B6").Select
lRowCount = ActiveSheet.UsedRange.Rows.Count
iColCount = ActiveSheet.UsedRange.Columns.Count


j = lRowCount - 5


ReDim Arr(1 To j, 1 To 2)

Range("B6").Select
For i = 1 To j

Arr(i, 1) = ActiveCell.Value
ActiveCell.Offset(0, 1).Select
Arr(i, 2) = ActiveCell.Value
ActiveCell.Offset(1, -1).Select
Next i


Worksheets("Salaries").Select


Range("B4").Select
MsgBox ActiveCell.Address
For m = 1 To j
ActiveCell.Value = Arr(m, 1)
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = Arr(m, 2)
ActiveCell.Offset(10, -1).Select
Next m




End Sub

 
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
Object Required JMB Excel Programming 0 March 26th 06 11:58 PM
Object Required aftamath Excel Discussion (Misc queries) 2 March 14th 06 10:19 PM
Object Required teresa Excel Programming 9 May 31st 05 06:21 PM
Object required? Vasant Nanavati Excel Programming 0 May 14th 05 09:38 PM
Object required? Tony Excel Programming 2 March 22nd 05 04:52 PM


All times are GMT +1. The time now is 02:25 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"