How to select / Activate Specific Excel Sheet without COM

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Ram
Posts: 16
Joined: 13 Jan 2021, 10:56

How to select / Activate Specific Excel Sheet without COM

Post by Ram » 04 Apr 2021, 15:05

Hello i need some help. Does anybody know how to write autohotkey code for selecting / activating specific Excel SHEET without COM?

Because i tried COM and it doesnt work after I reinstall new windows, so i'm lookin for another way without COM.

Thankyou very much
User avatar
HiSoKa
Posts: 480
Joined: 27 Jan 2020, 15:43

Re: How to select / Activate Specific Excel Sheet without COM

Post by HiSoKa » 04 Apr 2021, 15:51

If you mean that you want to move between sheet I think this code will help,

If the window is active you can use this code to move between Sheets.

Code: Select all

#SingleInstance, Force
SetTitleMatchMode, 2

#IfWinActive ahk_exe EXCEL.EXE
f1::  ; Next sheet 
send, {Ctrl Down}{PgDn}{CtrlUp}   
return
f2::  ; Previous sheet  
send, {Ctrl Down}{PgUp}{CtrlUp}
return

Esc::ExitApp
User avatar
flyingDman
Posts: 2848
Joined: 29 Sep 2013, 19:01

Re: How to select / Activate Specific Excel Sheet without COM

Post by flyingDman » 04 Apr 2021, 16:07

COM should work after a a Windows reinstall. Make sure Office is properly installed and registered. If you have an Office 365 subscription, go to https://account.microsoft.com/services/microsoft365/install to make sure your device is listed.

You might not need a script to do Ctrl PgUp and Ctrl PgDn....
14.3 & 1.3.7
User avatar
HiSoKa
Posts: 480
Joined: 27 Jan 2020, 15:43

Re: How to select / Activate Specific Excel Sheet without COM

Post by HiSoKa » 04 Apr 2021, 16:17

@flyingDman Thanks for point it out , Correct me if I'm wrong, Perhaps running the script as administrator will also make sense :roll: .
Ram
Posts: 16
Joined: 13 Jan 2021, 10:56

Re: How to select / Activate Specific Excel Sheet without COM

Post by Ram » 04 Apr 2021, 17:12

Thankyou very much for your help FlyingDman and Hisoka.

For your script its good man thankyou Hisoka.

And actually i already registered microsoft office etc... i'm still confused why my COM isn't working, it was working before reinstalling to new windows...
User avatar
flyingDman
Posts: 2848
Joined: 29 Sep 2013, 19:01

Re: How to select / Activate Specific Excel Sheet without COM

Post by flyingDman » 04 Apr 2021, 17:18

What error -if any - does it give you?
14.3 & 1.3.7
Post Reply

Return to “Ask for Help (v1)”