![]() |
variable = current cell in VB
Trying to make the variable z equal to the cell previously found by the scrip
Sheets("Eclipse").Selec Range("A1").Selec Cells.Find(What:="time", After:=ActiveCell, LookIn:=xlFormulas, LookAt :=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= False).Activat Cells.Find(What:="days", After:=ActiveCell, LookIn:=xlFormulas, LookAt:= xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False) .Selec z = Cells.Find(What:="days", After:=ActiveCell, LookIn:=xlFormulas, LookAt:= xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False) .Selec Cells(z + 1, "B").Valu x = ActiveCell.Addres Selection.End(xlDown).Selec y = ActiveCell.Addres Range(x, y).Selec Application.CutCopyMode = Fals Selection.Cop Sheets("Sheet1").Selec Range("B2").Selec ActiveSheet.Paste |
variable = current cell in VB
set z = Cells.Find(What:="days", After:=ActiveCell, LookIn:=xlFormulas,
LookAt:= _ xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False) z.Select "Tim" wrote in message ... Trying to make the variable z equal to the cell previously found by the script Sheets("Eclipse").Select Range("A1").Select Cells.Find(What:="time", After:=ActiveCell, LookIn:=xlFormulas, LookAt _ :=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _ False).Activate Cells.Find(What:="days", After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _ xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False) _ .Select z = Cells.Find(What:="days", After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _ xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False) _ .Select Cells(z + 1, "B").Value x = ActiveCell.Address Selection.End(xlDown).Select y = ActiveCell.Address Range(x, y).Select Application.CutCopyMode = False Selection.Copy Sheets("Sheet1").Select Range("B2").Select ActiveSheet.Paste |
variable = current cell in VB
Thanks Tom
|
variable = current cell in VB
When i try and run that code Tom it says that z is not defined properly, failed to provide a valid object qualifier.
|
variable = current cell in VB
Dim z as Range
-- Regards, Tom Ogilvy "Tim" wrote in message ... When i try and run that code Tom it says that z is not defined properly, failed to provide a valid object qualifier. |
variable = current cell in VB
Did you declare z as a range?
-- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Tim" wrote in message ... When i try and run that code Tom it says that z is not defined properly, failed to provide a valid object qualifier. |
All times are GMT +1. The time now is 01:13 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com