PDA

View Full Version : vba, worksheet visible issue



xander1981
03-13-2014, 02:16 PM
Hello,

I wrote a lot of code for a workbook which works brilliant on my local computer. I moved the file to a network drive so others could use it but as soon as I accessed the file from the network drive my code kept getting debugged with errors. one of which is making a sheet visible as follows. Don't know whats wrong as I just changed the file location???



Private Sub Workbook_Open()
Application.DisplayAlerts = False
Application.Visible = True
ActiveWorkbook.Worksheets("Data (Current Month)").Visible = True
ActiveWorkbook.Worksheets("Jan").Visible = False
ActiveWorkbook.Worksheets("Feb").Visible = False
ActiveWorkbook.Worksheets("Mar").Visible = False
ActiveWorkbook.Worksheets("Apr").Visible = False
ActiveWorkbook.Worksheets("May").Visible = False
ActiveWorkbook.Worksheets("Jun").Visible = False
ActiveWorkbook.Worksheets("Jul").Visible = False
ActiveWorkbook.Worksheets("Aug").Visible = False
ActiveWorkbook.Worksheets("Sep").Visible = False
ActiveWorkbook.Worksheets("Oct").Visible = False
ActiveWorkbook.Worksheets("Nov").Visible = False
ActiveWorkbook.Worksheets("Dec").Visible = False
End sub


Any help would be really great :)

xander1981
03-13-2014, 04:06 PM
Hi,

Please forget this post. There is a problem mith my settings I think (don't know what) but all others can use the workbook fine with no issues, the code is fine.