如何直接运行Excel的一段代码?

Post a reply


In an effort to prevent automatic submissions, we require that you complete the following challenge.
Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :| :mrgreen: :geek: :ugeek: :arrow: :angel: :clap: :crazy: :eh: :lolno: :problem: :shh: :shifty: :sick: :silent: :think: :thumbup: :thumbdown: :salute: :wave: :wtf: :yawn: :facepalm: :bravo: :dance: :beard: :morebeard: :xmas: :HeHe: :trollface: :cookie: :rainbow: :monkeysee: :monkeysay: :happybday: :headwall: :offtopic: :superhappy: :terms: :beer:
View more smilies

BBCode is ON
[img] is OFF
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: 如何直接运行Excel的一段代码?

Re: 如何直接运行Excel的一段代码?

Post by aamii » 06 Aug 2018, 18:21

cgx5871 wrote:
aamii wrote:在回答你这个问题之前,我比较好奇
debug是vba内置的调试语句,把结果输出到“立即窗口”,假如ahk能调用,你想把结果输出到哪里去呢?
我是想知道ahk调用vbe的格式.
正常调用即可,如:
MsgBox % ox.Application.VBE.ActiveCodePane.TopLine

但是Debug这个可能比较特殊,够呛。

Re: 如何直接运行Excel的一段代码?

Post by cgx5871 » 06 Aug 2018, 08:49

aamii wrote:在回答你这个问题之前,我比较好奇
debug是vba内置的调试语句,把结果输出到“立即窗口”,假如ahk能调用,你想把结果输出到哪里去呢?
我是想知道ahk调用vbe的格式.

Re: 如何直接运行Excel的一段代码?

Post by aamii » 05 Aug 2018, 23:38

在回答你这个问题之前,我比较好奇
debug是vba内置的调试语句,把结果输出到“立即窗口”,假如ahk能调用,你想把结果输出到哪里去呢?

如何直接运行Excel的一段代码?

Post by cgx5871 » 26 Jul 2018, 14:08

比如最简单的,
F5::
Debug.Print "yes" --这是Excel宏的语句
Return

Top