ermccarthy
Board Regular
- Joined
- Feb 15, 2002
- Messages
- 224
I have declared the following two statements in a macro I have created, unfortunatly I get an error #438:Object doesn't support this object or method, and it is always the second line that is highlighted...
workbk1 = Range("FileName").Value
acct = Workbooks(workbk1).ActiveCell.Value
here is the macro, or at least the first part of it.
path1 = Range("path1").Value
path2 = Range("path2").Value
path3 = Range("path3").Value
path4 = Range("path4").Value
Sht1 = Range("Sheet1").Value
Sht2 = Range("Sheet2").Value
Sht3 = Range("Sheet3").Value
Sht4 = Range("Sheet4").Value
workbk1 = Range("FileName").Value
acct = Workbooks(workbk1).ActiveCell.Value
Worksheets("matrix").Select
Range("D4").Select
If ActiveCell.Value <> "" Then
Workbooks.Open FileName:=path1
Worksheets(Sht1).Select
Range("F11").Select
Do Until ActiveCell = acct.Value
ActiveCell.Offset(0, 1).Select
Loop
ActiveCell.Offset(100, 0).Select
Do Until ActiveCell <> ""
ActiveCell.Offset(-1, 0).Select
Loop
Selection.Copy
Workbooks(workbk1).Active
ActiveCell.Offset(0, 3).Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
ActiveCell.Offset(1, -3).Select
Else: End If
Please help me-----there may be more errors in this, but I just can't get past this so far......
workbk1 = Range("FileName").Value
acct = Workbooks(workbk1).ActiveCell.Value
here is the macro, or at least the first part of it.
path1 = Range("path1").Value
path2 = Range("path2").Value
path3 = Range("path3").Value
path4 = Range("path4").Value
Sht1 = Range("Sheet1").Value
Sht2 = Range("Sheet2").Value
Sht3 = Range("Sheet3").Value
Sht4 = Range("Sheet4").Value
workbk1 = Range("FileName").Value
acct = Workbooks(workbk1).ActiveCell.Value
Worksheets("matrix").Select
Range("D4").Select
If ActiveCell.Value <> "" Then
Workbooks.Open FileName:=path1
Worksheets(Sht1).Select
Range("F11").Select
Do Until ActiveCell = acct.Value
ActiveCell.Offset(0, 1).Select
Loop
ActiveCell.Offset(100, 0).Select
Do Until ActiveCell <> ""
ActiveCell.Offset(-1, 0).Select
Loop
Selection.Copy
Workbooks(workbk1).Active
ActiveCell.Offset(0, 3).Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
ActiveCell.Offset(1, -3).Select
Else: End If
Please help me-----there may be more errors in this, but I just can't get past this so far......