Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
VBE Error (Project unviewable)
Hey guys
I have been using the following formula in VBE and it was working just fine now i want to add more data in th emain sheet so i tried to open the view code to edit the range but i hav ereceived the following message : Project is unviewable System error & H8000 400 S (-2147467259) unspecified error so i cannot edited the range what can i do to resolve this problem Workbook code Private Sub Workbook_Open() Dim ws As Worksheet Sheets("Main").Select If Range("D1").Value = "Carla" Then For Each ws In ThisWorkbook.Worksheets ws.Visible = True Next ws End If End Sub Sheet Main Option Explicit Private Sub Worksheet_SelectionChange(ByVal Target As Range) Dim ws As Worksheet Dim RngOfNames As Range If Target.Count 1 Then Exit Sub If Range("D1").Value = "Carla" Then Exit Sub Set RngOfNames = Union(Range("A12:A46"), Range("F12:F46")) Application.ScreenUpdating = False If Not Intersect(Target, RngOfNames) Is Nothing Then For Each ws In ThisWorkbook.Worksheets If ws.Name < "Main" Then ws.Visible = False Next ws On Error GoTo NoSht Sheets(CStr(Target.Value)).Visible = True Sheets(CStr(Target.Value)).Select End If Application.ScreenUpdating = True Exit Sub NoSht: On Error GoTo 0 MsgBox "There is no sheet named " & Target.Value & ".", 16, "Invalid Sheet Name" End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Can't Find Project or Library Error | Excel Discussion (Misc queries) | |||
Excell error "Can't find Project or Library" Project VBAProject | Excel Worksheet Functions | |||
can't find project or library - error | New Users to Excel | |||
indirect.ext - "can't find project or library" error | Excel Worksheet Functions | |||
help with this error-Compile error: cant find project or library | Excel Discussion (Misc queries) |