PDA

View Full Version : Solved: 2 VBA-Projects named the same after saving/opening file



Rejje
11-25-2010, 01:56 PM
Hi everyone! I get a strange thing from this sub. When saving as Range("V_50200").Value and opening the same workbook I get 2(!) VBA-Projects in the VBA editor named Range("V_50200").Value! Allthough: Only 1 workbook is open.

The sheet icons for one of the projects are also hilighted in some neon blue. It also seems to slow the update of the whole application a bit (it seem anyway).

How on Earth can this be?


Sub SaveThis3()
Dim wb As Workbook
Set wb = ActiveWorkbook

If Range("V_10300") = True Then

If UCase(wb.FullName) = UCase(Range("V_50100").Value) Then
ActiveWorkbook.SaveAs Range("V_50200").Value
Workbooks.Open wb.FullName
Else
wb.Save
End If

Else
MsgBox (UCase("Cannot save - title is missing!"))
Range("EXP_1010").Select

End If

Set wb = Nothing
End Sub

Bob Phillips
11-25-2010, 02:01 PM
I get this all the time. It is often attributed to an addin, I forget which one, but I have just learned to live with it.

Rejje
11-25-2010, 02:05 PM
Ok! If you can live with it - I will. Anyway it goes away after having saved properly. Thanks man!

Bob Phillips
11-25-2010, 02:08 PM
One thing to be aware of. If saving the workbook from within VBE (probably not a concern for you), make sure you activate the correct version.