global macro to add text

C

cuba

My poor brain.... I have not found answer to this after searching for
some time.

I have this macro:

Sub foo()
Dim rng
Set rng = Range(Start:=0, End:=0)
rng.Text = "Foobar"
End Sub

And when in a global (startup) DOT it does not work. I have failed to
find the way to tell it to refer to the active document. What am I
missing?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top