# Microsoft Office Application Help - Excel Help forum > Excel Programming / VBA / Macros >  > [SOLVED] Compile Error: Invalid Outside Procedure

## packet25

Hello, I hope that someone can help with the following problem.

I have created an Excel file on my desktop (in Excel 2007) that contains some basic macro commands. This file is saved to my Dropbox cloud folder.

I also have the same Dropbox cloud folder installed on my laptop.

When I open the same Excel file on my laptop (running Excel 2010) I get a Microsoft Visual Basic screen (that relates to one of the Macros) pop up and the message, 'Compile Error: Invalid Outside Procedure'.

I can close the Microsoft Visual Basic screen pop ups and carry on editing the file, but each time a make a change the same thing happens again, and I cannot run the macros.

Any help on resolving this irritating issue would be much appreciated.

Thank you.

----------


## arlu1201

The code module starts with Private Sub....() and ends with End sub.  Check if you have any lines of data outside these 2.

Press Alt+F11 and it will bring up the code.

----------


## packet25

Thank you for replying. I will try that. I am not very technical with Excel or computing, so please bear with me if I get it wrong. Do I press Alt+F11 when I am seeing the Visual Basic pop-ups?

----------


## arlu1201

Close the popup or click on OK button if present.  Then while looking at your excel file, press Alt+F11.

----------


## packet25

ALT+F11 does not bring up anything on my laptop (it just allows me to adjust the speaker volume). Anyway, the visual basic pop-up looks like it is the code, and while I can see 'End Sub' when I scroll to the bottom of the code page, I cannot see 'Private Sub' anywhere on the page.

The page starts as follows:

'
' Pricecomma Macro
' Inserts commas in the price to pay
'
' Keyboard shortcut: Ctrl+p
'

After that, there is all the specific macro code, and right at the bottom of that is, 'End Sub'.

----------


## arlu1201

Ok, just before 


```
Please Login or Register  to view this content.
```


 put Private Sub Test() You can replace Test with anything.

----------


## packet25

That seems to have sorted it! Thank you very much.

----------


## arlu1201

Based on your last post in this thread, its apparent that you are satisfied with the solution(s) you've received and have solved your question, but you haven't marked your thread as "SOLVED".  I will do it for you this time. 

In future, to mark your thread as Solved, you can do the following - 
Select Thread Tools-> Mark thread as Solved. 

Incase your issue is not solved, you can undo it as follows - 
Select Thread Tools-> Mark thread as Unsolved.

Also, since you are relatively new to the forum, i would like to inform you that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post which helped you.  This adds to the reputation of the person who has taken the time to help you.

----------

