Hi

Ive code some code:

Option Explicit
Sub Macro1()

DIm Count As Integer
Dim verticalcounter As Integer

'ActiveSheet.Select
ThisWorkbook.Worksheets(downloadsheetname).Select
'do lots of stuff

Call findaccount
End Sub

Sub findaccount()


ThisWorkbook.Worksheets(accountmappingsheetname).Select

'do some stuff

End Sub

Problem:

VB editor highlights accountmappingsheetname and says:

"variable not defined"

I know this is due to scope deceleration of the variable. I have tried declaring it as Public and Global but when i do decleration gets highlighted and error given:

"Invalid attribute in sub or function"

Please help, my boss is about to poo all over me