There's not quite enough info for us to help.
"I encounter a debug"..
Ok... what is the code, and when you get the "debug", what is the error, and
what line is it stopping on?
if you want it to run every 1/2 your, you can set up a scheduled task to open
the excel file.
But keep in mind that it will tie up your Excel session every 1/2 hour, so you
may want to run it on a
machine that isn't being used by a user.
or... you said you want to "paste it into excel".
Is the Excel file just a collection of data? Is the data being pasted to the
end of a list of data?
If so, perhaps you can just append the data to a comma separated file that can
be used by Excel.