I am getting a complie error that I did not get when the code was written. Earlier versions of the same workbook still work fine without error. I hope thie workbook is not corrupted.
The error happens with the None command in this code for a button in a user form.
Private Sub cmdConfirm_Click() Unload Me Range("$A$45:$G$152").Value = "" Range("$E$39").Value = "0" Range("$A$41:$G$152").Font.Bold = False Range("$D$41:$G$152").Interior.Color = RGB(255, 255, 204) Range("$D$41:$G$152").Borders.LineStyle = None End Sub
Last edited by proepert; 02-14-2010 at 03:40 AM.
proepert,
Try:
Range("$D$41:$G$152").Borders.LineStyle = xlNone
Have a great day,
Stan
stanleydgromjr
Windows Vista Business, Excel 2003 and 2007
If you are satisfied with the solution(s) provided, please mark your thread as Solved by clicking EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.
Wow that was fast, and it works, but can you tell me why it worked for weeks without the xl? Did I delete something I shouldn't have?
I'm also getting the same error message with the LCase command in the code below.
I tried adding xl to LCase but the error continues. Thank you for your help.Private Sub Worksheet_Change(ByVal Target As Range) With Target If .Address = "$O$36" Then If LCase(.Value) = "yes" Then Range("$O$37:$O$44").Value = "Yes" Else Range("$O$37:$O$44").Value = "No" End If End If End With End Sub
Excel 2000
Last edited by proepert; 02-13-2010 at 08:44 PM. Reason: Added Excel version, sorry
proepert,
Try:
Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = "$O$36" Then If LCase(Target) = "yes" Then Range("$O$37:$O$44").Value = "Yes" Else Range("$O$37:$O$44").Value = "No" End If End If End Sub
Have a great day,
Stan
stanleydgromjr
Windows Vista Business, Excel 2003 and 2007
If you are satisfied with the solution(s) provided, please mark your thread as Solved by clicking EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.
In the VBE, Tools > References, look for one that begins with MISSING and untick it.
Microsoft MVP - Excel
Entia non sunt multiplicanda sine necessitate
Thank you very much. I still don't know what happened but as long as you guys are here, I'm good.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks