• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Issue with Macro (Error Msg Run time Error -2147024809)

Hi
Having issues with VBA code.
I was initially helped with this project here on Chandoo. Initially, clicking on ovals allowed changes, but now when I completely try to reopen file and shutting down Excel, my code shows faulty messages.
It looks like this:

With ActiveSheet
objname = .Shapes(Application.Caller).Name
shpnum = Val(Replace(objname, "Oval ", ""))

If objname <> prevname Then
.Shapes(prevname).Fill.BackColor.RGB = DEFAULTCOLOR (main error) .Shapes(prevname).Fill.ForeColor.RGB = DEFAULTCOLOR
.Shapes(objname).Fill.BackColor.RGB = CLICKEDCOLOR
.Shapes(objname).Fill.ForeColor.RGB = CLICKEDCOLOR

Not sure what to do.
 

Attachments

  • SLS WHATWEDO PROJECT 1.0.xlsm
    623.3 KB · Views: 4
  • SLS WHATWEDO PROJECT 2.0.xlsm
    594.9 KB · Views: 3
Hi Deepak
Still don t see how that affects the macro.
I need help modifying it.

Hi,
This is what you want to fill

.Shapes(prevname).Fill.BackColor.RGB = DEFAULTCOLOR


where prevname is Shape (Oval 86).

So if will not exist then how could you paint it.
 
Deepak
You are my hero.
A cup of coffee and all i needed was to notice i had mistakenly deleted my default value , the oval 86.
I just replaced with a current one.

Thank you
 
Back
Top