View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
[email protected] gojakie@gmail.com is offline
external usenet poster
 
Posts: 11
Default Removing unnecessary rows through macro

I am confused :(

I pasted the entire code in the Insert-Module section and saved the
file as a template .xla

Then I opened my file and ran the shortcut key but it shows an error
Compile Error: Only comments may appear after End Sub, End Function,
End Property.

What am I supposed to do?

I want all the coding in the .xla file which I will use as an addin.
After that whatever file I open, I should be able to call the program
using the shortcut key which I have set.

Please help

On Oct 14, 5:51*pm, Mike H wrote:
Hi,

There' no reason this won't run as an addin but it worksheet code and works
on the active sheet. To check if your in the correct workbook you will need
to call another routine to check for those values and pass a variable back to
the sub try this. The sub now call a sub which must go in a general module
and pases the variable 'rightbook'