PDA

View Full Version : Solved: excel 2013 conflicting with 2010 vba



gringo287
04-06-2013, 01:40 PM
Ive had a few issues with 2013 and thought id ironed them out but, something else has cropped up.

I was working on this project perfectly fine at work today on 2010, but i'm at a standstill straight away on 2013

This is a snippet of the vba, where its bugging, with "Compile error: can not find project or library"

I

With LblDailyOffers
.Tag = Val(Range("J10").Value)
.Caption = Format(.Tag, "0.00 %")
If Val(.Tag) <= "00.55" Then
.ForeColor = RGB(102, 0, 102) 'purple
Else
If Val(.Tag) >= "00.55" Then
.ForeColor = RGB(0, 255, 0) 'green
End If
End If
End With

Aussiebear
04-06-2013, 02:35 PM
What happens if the value is exactly 00.55?

gringo287
04-06-2013, 02:45 PM
Dont think It's to do with the values, as it happens when i set it to a cell vallue

With LblB1Overall
.Tag = Val(Range("D14").Value)
.Caption = Format(.Tag, "0.00 %")
'If Val(.Tag) < (Range("M3").Value) Then
' .ForeColor = RGB(102, 0, 102) 'purple
'Else
If Val(.Tag) <= (Range("M3").Value) Then
.ForeColor = RGB(255, 102, 0) 'amber
Else
If Val(.Tag) >= (Range("M3").Value) Then
.ForeColor = RGB(0, 255, 0) 'green
' End If
End If
End If
End With

Aussiebear
04-06-2013, 02:57 PM
I see you have made the change in the second set of code

mdmackillop
04-07-2013, 02:43 AM
Check your Tools/References for missing items and untick any found.

snb
04-07-2013, 03:52 AM
You are using a rather peculiar order of code instructions;
Do you want to compare strings or numbers ?
The conditions you use for the forecolor are not mutually exclusive.
You better use a reference to the sheet that contains the ranges.


With LblB1Overall
.ForeColor = iif(Sheets("Sheet1").Range("D14").Value<Sheets("Sheet1").Range("M3").Value,RGB(255, 102, 0),RGB(0, 255, 0))
.Tag = Sheets("Sheet1").Range("D14").Value
.Caption = Format(.Tag, "0.00 %")
End With

gringo287
04-07-2013, 12:41 PM
Mdmackillop, I took your advice and i think i may love you.


Check your Tools/References for missing items and untick any found.

There was a "missing" reference, which i unticked and now it seems fine .. apart from my shoddy vba:whistle:. My plan was to come back to the references, to snip a pic of it and post it here but, strangely, now I've unticked it, its not even in the list of references anymore. This sounds Ridiculous, considering were talking about a missing reference, but in the list it actually referred to the reference as "MISSING"..

gringo287
04-11-2013, 12:30 PM
I'd love it if someone could some light on this one. Although unticking the "missing" reference has solved that one conflict i was having, there are still a few other small things that keep cropping up.

SamT
04-11-2013, 03:17 PM
I'd love it if someone could some light on this one. Although unticking the "missing" reference has solved that one conflict i was having, there are still a few other small things that keep cropping up.
:aw

Aussiebear
04-11-2013, 07:46 PM
there are still a few other small things that keep cropping up.

Would you like to indicate what these issues are?

gringo287
04-27-2013, 10:39 AM
Sorry guys, didn't even notice your responses until i've just checked back in now after coming back to this project.

I've forwarded a copy of the project from work to my home pc and experienced the same problem that just keeps referring to as missing module amongst other things.

Anywho, i made sure i made a note of the illusive "missing" reference before unchecking it (which resolved the issue straight away).

[missing: microsoft windows common controls-2 6.0 (sp6)]

I've googled and it seems to be relating to the Date and time picker. I had previously dabbled with creating a pro rata calculator which required a DT picker, but it wasn't linked to this or any of the other projects i've been experiencing issues with.

Anyway at least i know now. Thanks for your input guys, sorry for being so lax with my responses