Expired

Any excel macro experts out there, I need help?

10 replies
Found 20th Jun 2014
I am trying to record a simple macro (in excel 2007) which finds a time in another workbook. But when I try to run it after recording it I keep getting this "run-time error 91"

I have tried googling it with no luck?

The coding is below?

' Keyboard Shortcut: Ctrl+q
'
ActiveWindow.ActivateNext
ActiveCell.Offset(1, 0).Range("A1").Select
Cells.find(What:="18:00", After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False, SearchFormat:=False).Activate
ActiveWindow.ActivateNext
End Sub

10 Comments

I would suggest posting this with some sample data to MrExcel.com or a similar Excel based site.

Have you tried putting the macro into debug and watching to see what statement it errors on? Should give you a good place to start.

I am trying to record a simple macro (in excel 2007) which finds a time … I am trying to record a simple macro (in excel 2007) which finds a time in another workbook



I cannot see in your coding where the other workbook is identified

All I can see is the coding states "ActiveWindow" which to me means the code looks at the front most active window

Original Poster

hockeygod76

Have you tried putting the macro into debug and watching to see what … Have you tried putting the macro into debug and watching to see what statement it errors on? Should give you a good place to start.



Yes thanks, I get this but don't know where to go from there


http://oi62.tinypic.com/2l9i0jl.jpg
Edited by: "Gooner77" 20th Jun 2014

Original Poster

philphil61

I cannot see in your coding where the other workbook is identifiedAll I … I cannot see in your coding where the other workbook is identifiedAll I can see is the coding states "ActiveWindow" which to me means the code looks at the front most active window




Hi it is looking at this table which is active but returns the error


http://oi57.tinypic.com/11t7ei9.jpg

Gooner77

Yes thanks, I get this but don't know where to go from there



change "LookIn:=xlFormulas" to "LookIn:=xlValues"

Original Poster

hockeygod76

change "LookIn:=xlFormulas" to "LookIn:=xlValues"




Awesome, that works a treat. Thank you very much for the help X)



change "LookIn:=xlFormulas" to "LookIn:=xlValues"[/quote]

Hi hockeygod76 , would you be able to guide me in the right direction about learning macros , specifically for gaming , I haven't a clue where to even start or what type of program I will need. The reason is many players are using macros to help them out and I have only just found this out as I'm new to pc gaming.

Thanks in advance

Crusader777

change "LookIn:=xlFormulas" to "LookIn:=xlValues"



Hi hockeygod76 , would you be able to guide me in the right direction about learning macros , specifically for gaming , I haven't a clue where to even start or what type of program I will need. The reason is many players are using macros to help them out and I have only just found this out as I'm new to pc gaming.

Thanks in advance[/quote]

That's a whole different level of macro to the standard excel macro's that this thread is talking about, and way out of my comfort zone I'm afraid

hockeygod76

change "LookIn:=xlFormulas" to "LookIn:=xlValues"



Well played!
Post a comment
Avatar
@
    Text
    Top Discussions
    1. Just heard this...2 ★★★★★★★★★★★★★★ congrats to all on 392k ★★★★★★★★★★★★★★7769367
    2. Smacking children is to be banned in Scotland3280
    3. Happy Bandi Chorr Diwas and Happy Diwali!1214
    4. Limited quantities of STRAFE® and SHADOW WARRIOR 2 for sale @ Special Reser…47

    See more discussions