Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Compatibility problem?
I am a fairly light excel user so my problem might be obvious to some
(hopefully). I have a spreadsheet with a macro written in XP which works fine, no glitches or bugs. I have tried to run the same file on Excel '97 and its coming up with an error. Am I wrong to assume that there is a compatibility problem? I though that the code would be the same in both versions. Please enlighten me. Thanks alex.geo |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Compatibility problem?
XP has functionality that wasn't available in 97. You should develop your
code on the earliest version that you intend to use, and then port up, not the other way. What is the code that is failing? -- HTH Bob Phillips (remove nothere from email address if mailing direct) "Alex" wrote in message . .. I am a fairly light excel user so my problem might be obvious to some (hopefully). I have a spreadsheet with a macro written in XP which works fine, no glitches or bugs. I have tried to run the same file on Excel '97 and its coming up with an error. Am I wrong to assume that there is a compatibility problem? I though that the code would be the same in both versions. Please enlighten me. Thanks alex.geo |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Compatibility problem?
Thanks for the quick response.
I dont know which part of the code is failing but when I run it on '97 it comes up with a general error. I have pasted part of the code below in which I believe the problem lies (sorry, its a bit long). Thanks. Private Sub UpdateDisplay_Click() Dim ctr As Integer Dim Location As String, tempStr As String Dim JobStatus As String Dim JobDate As Date On Error GoTo ErrorTrap ScreenUpdating = False 'highlight "none" as job owner For ctr = 8 To NoOfProjects Location = "f" + CStr(ctr) tempStr = Range(Location) If tempStr = "None" Then Range(Location).Font.Color = vbRed Range(Location).Font.Bold = True Else Range(Location).Font.Color = vbBlack Range(Location).Font.Bold = False End If Next ctr 'highlight job status For ctr = 8 To NoOfProjects Location = "i" + CStr(ctr) JobStatus = Range(Location) If JobStatus = "Disrupted" Then Range(Location).Font.Color = vbRed Range(Location).Font.Bold = True End If If JobStatus = "In progress" Then Range(Location).Font.Color = RGB(220, 130, 20) If JobStatus = "Completed" Then Range(Location).Font.Color = vbGreen Next ctr 'highlight late jobs For ctr = 8 To NoOfProjects Location = "i" + CStr(ctr) JobStatus = Range(Location) Location = "h" + CStr(ctr) JobDate = Range(Location) If JobDate <= Now() And JobStatus < "Completed" Then Range(Location).Font.Color = vbRed Range(Location).Font.Bold = True Else Range(Location).Font.Color = vbBlack Range(Location).Font.Bold = False End If Next ctr 'update workload table Dim counter As Integer Dim dblScore(13) As Double Dim intWorkload As Integer Dim strManager(13) As String Dim strMgr As String Dim strTmpStatus As String 'assign manager names strManager(0) = "A" strManager(1) = "B" strManager(2) = "C" strManager(3) = "D" strManager(4) = "E" strManager(5) = "F" strManager(6) = "G" strManager(7) = "H" strManager(8) = "I" strManager(9) = "J" strManager(10) = "K" strManager(11) = "L" strManager(12) = "M" For ctr = 0 To 12 dblScore(ctr) = 0 Next ctr 'calculate workload scores For ctr = 8 To NoOfProjects intWorkload = 0 Location = "f" + CStr(ctr) strMgr = Range(Location) Location = "j" + CStr(ctr) intWorkload = Range(Location) Location = "i" + CStr(ctr) strTmpStatus = Range(Location) For counter = 0 To 12 If (strManager(counter) = strMgr) And (strTmpStatus < "Completed") Then _ dblScore(counter) = dblScore(counter) + intWorkload Next counter Next ctr 'display the workload scores Dim StrTotal As String Worksheets("Manager Workload").Range("a2:a14").HorizontalAlignment = xlLeft Worksheets("Manager Workload").Range("b2:b14").HorizontalAlignment = xlCenter For ctr = 0 To 12 Location = "a" + CStr(ctr + 2) Worksheets("Manager Workload").Range(Location) = strManager(ctr) Worksheets("Manager Workload").Range(Location).Font.Bold = False Location = "b" + CStr(ctr + 2) Worksheets("Manager Workload").Range(Location) = dblScore(ctr) Worksheets("Manager Workload").Range(Location).Font.Bold = False Next ctr Location = "a" + CStr(ctr + 2) Worksheets("Manager Workload").Range(Location) = "Total" Worksheets("Manager Workload").Range(Location).Font.Bold = True Location = "b" + CStr(ctr + 2) StrTotal = "b" + CStr(ctr + 1) Worksheets("Manager Workload").Range(Location).Formula = "=sum(b2:" + StrTotal + ")" Worksheets("Manager Workload").Range(Location).Font.Bold = True 'update business unit workload table Dim dblBUScore(37) As Double Dim strBU(37) As String Dim StrBUnit As String 'assign manager names strBU(0) = "BU1" strBU(1) = "BU2" strBU(2) = "BU3" strBU(3) = "BU4" strBU(4) = "BU5" strBU(5) = "BU6" strBU(6) = "BU7" strBU(7) = "BU8" strBU(8) = "BU9" strBU(9) = "BU10" strBU(10) = "BU11" strBU(11) = "BU12" strBU(12) = "BU13" strBU(13) = "BU14" strBU(14) = "BU15" strBU(15) = "BU16" strBU(16) = "BU17" strBU(17) = "BU18" strBU(18) = "BU19" strBU(19) = "BU20" strBU(20) = "BU21" strBU(21) = "BU22" strBU(22) = "BU23" strBU(23) = "BU24" strBU(24) = "BU25" strBU(25) = "BU26" strBU(26) = "BU27" strBU(27) = "BU28" strBU(28) = "BU29" strBU(29) = "BU30" strBU(30) = "BU31" strBU(31) = "BU32" strBU(32) = "BU33" strBU(33) = "BU34" strBU(34) = "BU35" strBU(35) = "BU36" strBU(36) = "BU37" For ctr = 0 To 36 dblBUScore(ctr) = 0 Next ctr 'calculate workload scores For ctr = 8 To NoOfProjects intWorkload = 0 Location = "d" + CStr(ctr) StrBUnit = Range(Location) Location = "j" + CStr(ctr) intWorkload = Range(Location) For counter = 0 To 36 If strBU(counter) = StrBUnit Then dblBUScore(counter) = dblBUScore(counter) + intWorkload Next counter Next ctr 'display the workload scores Worksheets("BU Workload").Range("a2:a38").HorizontalAlignment = xlLeft Worksheets("BU Workload").Range("b2:b38").HorizontalAlignment = xlCenter For ctr = 0 To 6 Location = "a" + CStr(ctr + 2) Worksheets("BU Workload").Range(Location) = strBU(ctr) Worksheets("BU Workload").Range(Location).Font.Bold = False Worksheets("BU Workload").Range(Location).Font.Color = vbBlue Location = "b" + CStr(ctr + 2) Worksheets("BU Workload").Range(Location) = dblBUScore(ctr) Worksheets("BU Workload").Range(Location).Font.Bold = False Next ctr For ctr = 7 To 10 Location = "a" + CStr(ctr + 2) Worksheets("BU Workload").Range(Location) = strBU(ctr) Worksheets("BU Workload").Range(Location).Font.Bold = False Worksheets("BU Workload").Range(Location).Font.Color = vbGreen Location = "b" + CStr(ctr + 2) Worksheets("BU Workload").Range(Location) = dblBUScore(ctr) Worksheets("BU Workload").Range(Location).Font.Bold = False Next ctr For ctr = 11 To 22 Location = "a" + CStr(ctr + 2) Worksheets("BU Workload").Range(Location) = strBU(ctr) Worksheets("BU Workload").Range(Location).Font.Bold = False Worksheets("BU Workload").Range(Location).Font.Color = RGB(220, 130, 20) Location = "b" + CStr(ctr + 2) Worksheets("BU Workload").Range(Location) = dblBUScore(ctr) Worksheets("BU Workload").Range(Location).Font.Bold = False Next ctr For ctr = 23 To 36 Location = "a" + CStr(ctr + 2) Worksheets("BU Workload").Range(Location) = strBU(ctr) Worksheets("BU Workload").Range(Location).Font.Bold = False Worksheets("BU Workload").Range(Location).Font.Color = vbRed Location = "b" + CStr(ctr + 2) Worksheets("BU Workload").Range(Location) = dblBUScore(ctr) Worksheets("BU Workload").Range(Location).Font.Bold = False Next ctr Location = "a" + CStr(ctr + 2) Worksheets("BU Workload").Range(Location) = "Total" Worksheets("BU Workload").Range(Location).Font.Bold = True Location = "b" + CStr(ctr + 2) StrTotal = "b" + CStr(ctr + 1) Worksheets("BU Workload").Range(Location).Formula = "=sum(b2:" + StrTotal + ")" Worksheets("BU Workload").Range(Location).Font.Bold = True Worksheets("Work Register").Activate ScreenUpdating = True GoTo EndCode ErrorTrap: MsgBox "Call 020 7822 7654 for assistance", vbOKOnly + vbExclamation, "Error encountered in cmdButton 2" EndCode: End Sub |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Compatibility problem?
But it must stop at a particular line. When it fails, if you select Debug
button, it will show which line is in error. -- HTH Bob Phillips (remove nothere from email address if mailing direct) "Alex" wrote in message . .. Thanks for the quick response. I dont know which part of the code is failing but when I run it on '97 it comes up with a general error. I have pasted part of the code below in which I believe the problem lies (sorry, its a bit long). Thanks. Private Sub UpdateDisplay_Click() Dim ctr As Integer Dim Location As String, tempStr As String Dim JobStatus As String Dim JobDate As Date On Error GoTo ErrorTrap ScreenUpdating = False 'highlight "none" as job owner For ctr = 8 To NoOfProjects Location = "f" + CStr(ctr) tempStr = Range(Location) If tempStr = "None" Then Range(Location).Font.Color = vbRed Range(Location).Font.Bold = True Else Range(Location).Font.Color = vbBlack Range(Location).Font.Bold = False End If Next ctr 'highlight job status For ctr = 8 To NoOfProjects Location = "i" + CStr(ctr) JobStatus = Range(Location) If JobStatus = "Disrupted" Then Range(Location).Font.Color = vbRed Range(Location).Font.Bold = True End If If JobStatus = "In progress" Then Range(Location).Font.Color = RGB(220, 130, 20) If JobStatus = "Completed" Then Range(Location).Font.Color = vbGreen Next ctr 'highlight late jobs For ctr = 8 To NoOfProjects Location = "i" + CStr(ctr) JobStatus = Range(Location) Location = "h" + CStr(ctr) JobDate = Range(Location) If JobDate <= Now() And JobStatus < "Completed" Then Range(Location).Font.Color = vbRed Range(Location).Font.Bold = True Else Range(Location).Font.Color = vbBlack Range(Location).Font.Bold = False End If Next ctr 'update workload table Dim counter As Integer Dim dblScore(13) As Double Dim intWorkload As Integer Dim strManager(13) As String Dim strMgr As String Dim strTmpStatus As String 'assign manager names strManager(0) = "A" strManager(1) = "B" strManager(2) = "C" strManager(3) = "D" strManager(4) = "E" strManager(5) = "F" strManager(6) = "G" strManager(7) = "H" strManager(8) = "I" strManager(9) = "J" strManager(10) = "K" strManager(11) = "L" strManager(12) = "M" For ctr = 0 To 12 dblScore(ctr) = 0 Next ctr 'calculate workload scores For ctr = 8 To NoOfProjects intWorkload = 0 Location = "f" + CStr(ctr) strMgr = Range(Location) Location = "j" + CStr(ctr) intWorkload = Range(Location) Location = "i" + CStr(ctr) strTmpStatus = Range(Location) For counter = 0 To 12 If (strManager(counter) = strMgr) And (strTmpStatus < "Completed") Then _ dblScore(counter) = dblScore(counter) + intWorkload Next counter Next ctr 'display the workload scores Dim StrTotal As String Worksheets("Manager Workload").Range("a2:a14").HorizontalAlignment = xlLeft Worksheets("Manager Workload").Range("b2:b14").HorizontalAlignment = xlCenter For ctr = 0 To 12 Location = "a" + CStr(ctr + 2) Worksheets("Manager Workload").Range(Location) = strManager(ctr) Worksheets("Manager Workload").Range(Location).Font.Bold = False Location = "b" + CStr(ctr + 2) Worksheets("Manager Workload").Range(Location) = dblScore(ctr) Worksheets("Manager Workload").Range(Location).Font.Bold = False Next ctr Location = "a" + CStr(ctr + 2) Worksheets("Manager Workload").Range(Location) = "Total" Worksheets("Manager Workload").Range(Location).Font.Bold = True Location = "b" + CStr(ctr + 2) StrTotal = "b" + CStr(ctr + 1) Worksheets("Manager Workload").Range(Location).Formula = "=sum(b2:" + StrTotal + ")" Worksheets("Manager Workload").Range(Location).Font.Bold = True 'update business unit workload table Dim dblBUScore(37) As Double Dim strBU(37) As String Dim StrBUnit As String 'assign manager names strBU(0) = "BU1" strBU(1) = "BU2" strBU(2) = "BU3" strBU(3) = "BU4" strBU(4) = "BU5" strBU(5) = "BU6" strBU(6) = "BU7" strBU(7) = "BU8" strBU(8) = "BU9" strBU(9) = "BU10" strBU(10) = "BU11" strBU(11) = "BU12" strBU(12) = "BU13" strBU(13) = "BU14" strBU(14) = "BU15" strBU(15) = "BU16" strBU(16) = "BU17" strBU(17) = "BU18" strBU(18) = "BU19" strBU(19) = "BU20" strBU(20) = "BU21" strBU(21) = "BU22" strBU(22) = "BU23" strBU(23) = "BU24" strBU(24) = "BU25" strBU(25) = "BU26" strBU(26) = "BU27" strBU(27) = "BU28" strBU(28) = "BU29" strBU(29) = "BU30" strBU(30) = "BU31" strBU(31) = "BU32" strBU(32) = "BU33" strBU(33) = "BU34" strBU(34) = "BU35" strBU(35) = "BU36" strBU(36) = "BU37" For ctr = 0 To 36 dblBUScore(ctr) = 0 Next ctr 'calculate workload scores For ctr = 8 To NoOfProjects intWorkload = 0 Location = "d" + CStr(ctr) StrBUnit = Range(Location) Location = "j" + CStr(ctr) intWorkload = Range(Location) For counter = 0 To 36 If strBU(counter) = StrBUnit Then dblBUScore(counter) = dblBUScore(counter) + intWorkload Next counter Next ctr 'display the workload scores Worksheets("BU Workload").Range("a2:a38").HorizontalAlignment = xlLeft Worksheets("BU Workload").Range("b2:b38").HorizontalAlignment = xlCenter For ctr = 0 To 6 Location = "a" + CStr(ctr + 2) Worksheets("BU Workload").Range(Location) = strBU(ctr) Worksheets("BU Workload").Range(Location).Font.Bold = False Worksheets("BU Workload").Range(Location).Font.Color = vbBlue Location = "b" + CStr(ctr + 2) Worksheets("BU Workload").Range(Location) = dblBUScore(ctr) Worksheets("BU Workload").Range(Location).Font.Bold = False Next ctr For ctr = 7 To 10 Location = "a" + CStr(ctr + 2) Worksheets("BU Workload").Range(Location) = strBU(ctr) Worksheets("BU Workload").Range(Location).Font.Bold = False Worksheets("BU Workload").Range(Location).Font.Color = vbGreen Location = "b" + CStr(ctr + 2) Worksheets("BU Workload").Range(Location) = dblBUScore(ctr) Worksheets("BU Workload").Range(Location).Font.Bold = False Next ctr For ctr = 11 To 22 Location = "a" + CStr(ctr + 2) Worksheets("BU Workload").Range(Location) = strBU(ctr) Worksheets("BU Workload").Range(Location).Font.Bold = False Worksheets("BU Workload").Range(Location).Font.Color = RGB(220, 130, 20) Location = "b" + CStr(ctr + 2) Worksheets("BU Workload").Range(Location) = dblBUScore(ctr) Worksheets("BU Workload").Range(Location).Font.Bold = False Next ctr For ctr = 23 To 36 Location = "a" + CStr(ctr + 2) Worksheets("BU Workload").Range(Location) = strBU(ctr) Worksheets("BU Workload").Range(Location).Font.Bold = False Worksheets("BU Workload").Range(Location).Font.Color = vbRed Location = "b" + CStr(ctr + 2) Worksheets("BU Workload").Range(Location) = dblBUScore(ctr) Worksheets("BU Workload").Range(Location).Font.Bold = False Next ctr Location = "a" + CStr(ctr + 2) Worksheets("BU Workload").Range(Location) = "Total" Worksheets("BU Workload").Range(Location).Font.Bold = True Location = "b" + CStr(ctr + 2) StrTotal = "b" + CStr(ctr + 1) Worksheets("BU Workload").Range(Location).Formula = "=sum(b2:" + StrTotal + ")" Worksheets("BU Workload").Range(Location).Font.Bold = True Worksheets("Work Register").Activate ScreenUpdating = True GoTo EndCode ErrorTrap: MsgBox "Call 020 7822 7654 for assistance", vbOKOnly + vbExclamation, "Error encountered in cmdButton 2" EndCode: End Sub |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Compatibility problem?
Since you say xl97
Assuming UpdateDisplay is a Commandbutton, change the TakeFocusOnClick property to False If this solves it, this is a bug in xl97 that has been fixed in later versions. -- Regards, Tom Ogilvy "Alex" wrote in message . .. Thanks for the quick response. I dont know which part of the code is failing but when I run it on '97 it comes up with a general error. I have pasted part of the code below in which I believe the problem lies (sorry, its a bit long). Thanks. Private Sub UpdateDisplay_Click() Dim ctr As Integer Dim Location As String, tempStr As String Dim JobStatus As String Dim JobDate As Date On Error GoTo ErrorTrap ScreenUpdating = False 'highlight "none" as job owner For ctr = 8 To NoOfProjects Location = "f" + CStr(ctr) tempStr = Range(Location) If tempStr = "None" Then Range(Location).Font.Color = vbRed Range(Location).Font.Bold = True Else Range(Location).Font.Color = vbBlack Range(Location).Font.Bold = False End If Next ctr 'highlight job status For ctr = 8 To NoOfProjects Location = "i" + CStr(ctr) JobStatus = Range(Location) If JobStatus = "Disrupted" Then Range(Location).Font.Color = vbRed Range(Location).Font.Bold = True End If If JobStatus = "In progress" Then Range(Location).Font.Color = RGB(220, 130, 20) If JobStatus = "Completed" Then Range(Location).Font.Color = vbGreen Next ctr 'highlight late jobs For ctr = 8 To NoOfProjects Location = "i" + CStr(ctr) JobStatus = Range(Location) Location = "h" + CStr(ctr) JobDate = Range(Location) If JobDate <= Now() And JobStatus < "Completed" Then Range(Location).Font.Color = vbRed Range(Location).Font.Bold = True Else Range(Location).Font.Color = vbBlack Range(Location).Font.Bold = False End If Next ctr 'update workload table Dim counter As Integer Dim dblScore(13) As Double Dim intWorkload As Integer Dim strManager(13) As String Dim strMgr As String Dim strTmpStatus As String 'assign manager names strManager(0) = "A" strManager(1) = "B" strManager(2) = "C" strManager(3) = "D" strManager(4) = "E" strManager(5) = "F" strManager(6) = "G" strManager(7) = "H" strManager(8) = "I" strManager(9) = "J" strManager(10) = "K" strManager(11) = "L" strManager(12) = "M" For ctr = 0 To 12 dblScore(ctr) = 0 Next ctr 'calculate workload scores For ctr = 8 To NoOfProjects intWorkload = 0 Location = "f" + CStr(ctr) strMgr = Range(Location) Location = "j" + CStr(ctr) intWorkload = Range(Location) Location = "i" + CStr(ctr) strTmpStatus = Range(Location) For counter = 0 To 12 If (strManager(counter) = strMgr) And (strTmpStatus < "Completed") Then _ dblScore(counter) = dblScore(counter) + intWorkload Next counter Next ctr 'display the workload scores Dim StrTotal As String Worksheets("Manager Workload").Range("a2:a14").HorizontalAlignment = xlLeft Worksheets("Manager Workload").Range("b2:b14").HorizontalAlignment = xlCenter For ctr = 0 To 12 Location = "a" + CStr(ctr + 2) Worksheets("Manager Workload").Range(Location) = strManager(ctr) Worksheets("Manager Workload").Range(Location).Font.Bold = False Location = "b" + CStr(ctr + 2) Worksheets("Manager Workload").Range(Location) = dblScore(ctr) Worksheets("Manager Workload").Range(Location).Font.Bold = False Next ctr Location = "a" + CStr(ctr + 2) Worksheets("Manager Workload").Range(Location) = "Total" Worksheets("Manager Workload").Range(Location).Font.Bold = True Location = "b" + CStr(ctr + 2) StrTotal = "b" + CStr(ctr + 1) Worksheets("Manager Workload").Range(Location).Formula = "=sum(b2:" + StrTotal + ")" Worksheets("Manager Workload").Range(Location).Font.Bold = True 'update business unit workload table Dim dblBUScore(37) As Double Dim strBU(37) As String Dim StrBUnit As String 'assign manager names strBU(0) = "BU1" strBU(1) = "BU2" strBU(2) = "BU3" strBU(3) = "BU4" strBU(4) = "BU5" strBU(5) = "BU6" strBU(6) = "BU7" strBU(7) = "BU8" strBU(8) = "BU9" strBU(9) = "BU10" strBU(10) = "BU11" strBU(11) = "BU12" strBU(12) = "BU13" strBU(13) = "BU14" strBU(14) = "BU15" strBU(15) = "BU16" strBU(16) = "BU17" strBU(17) = "BU18" strBU(18) = "BU19" strBU(19) = "BU20" strBU(20) = "BU21" strBU(21) = "BU22" strBU(22) = "BU23" strBU(23) = "BU24" strBU(24) = "BU25" strBU(25) = "BU26" strBU(26) = "BU27" strBU(27) = "BU28" strBU(28) = "BU29" strBU(29) = "BU30" strBU(30) = "BU31" strBU(31) = "BU32" strBU(32) = "BU33" strBU(33) = "BU34" strBU(34) = "BU35" strBU(35) = "BU36" strBU(36) = "BU37" For ctr = 0 To 36 dblBUScore(ctr) = 0 Next ctr 'calculate workload scores For ctr = 8 To NoOfProjects intWorkload = 0 Location = "d" + CStr(ctr) StrBUnit = Range(Location) Location = "j" + CStr(ctr) intWorkload = Range(Location) For counter = 0 To 36 If strBU(counter) = StrBUnit Then dblBUScore(counter) = dblBUScore(counter) + intWorkload Next counter Next ctr 'display the workload scores Worksheets("BU Workload").Range("a2:a38").HorizontalAlignment = xlLeft Worksheets("BU Workload").Range("b2:b38").HorizontalAlignment = xlCenter For ctr = 0 To 6 Location = "a" + CStr(ctr + 2) Worksheets("BU Workload").Range(Location) = strBU(ctr) Worksheets("BU Workload").Range(Location).Font.Bold = False Worksheets("BU Workload").Range(Location).Font.Color = vbBlue Location = "b" + CStr(ctr + 2) Worksheets("BU Workload").Range(Location) = dblBUScore(ctr) Worksheets("BU Workload").Range(Location).Font.Bold = False Next ctr For ctr = 7 To 10 Location = "a" + CStr(ctr + 2) Worksheets("BU Workload").Range(Location) = strBU(ctr) Worksheets("BU Workload").Range(Location).Font.Bold = False Worksheets("BU Workload").Range(Location).Font.Color = vbGreen Location = "b" + CStr(ctr + 2) Worksheets("BU Workload").Range(Location) = dblBUScore(ctr) Worksheets("BU Workload").Range(Location).Font.Bold = False Next ctr For ctr = 11 To 22 Location = "a" + CStr(ctr + 2) Worksheets("BU Workload").Range(Location) = strBU(ctr) Worksheets("BU Workload").Range(Location).Font.Bold = False Worksheets("BU Workload").Range(Location).Font.Color = RGB(220, 130, 20) Location = "b" + CStr(ctr + 2) Worksheets("BU Workload").Range(Location) = dblBUScore(ctr) Worksheets("BU Workload").Range(Location).Font.Bold = False Next ctr For ctr = 23 To 36 Location = "a" + CStr(ctr + 2) Worksheets("BU Workload").Range(Location) = strBU(ctr) Worksheets("BU Workload").Range(Location).Font.Bold = False Worksheets("BU Workload").Range(Location).Font.Color = vbRed Location = "b" + CStr(ctr + 2) Worksheets("BU Workload").Range(Location) = dblBUScore(ctr) Worksheets("BU Workload").Range(Location).Font.Bold = False Next ctr Location = "a" + CStr(ctr + 2) Worksheets("BU Workload").Range(Location) = "Total" Worksheets("BU Workload").Range(Location).Font.Bold = True Location = "b" + CStr(ctr + 2) StrTotal = "b" + CStr(ctr + 1) Worksheets("BU Workload").Range(Location).Formula = "=sum(b2:" + StrTotal + ")" Worksheets("BU Workload").Range(Location).Font.Bold = True Worksheets("Work Register").Activate ScreenUpdating = True GoTo EndCode ErrorTrap: MsgBox "Call 020 7822 7654 for assistance", vbOKOnly + vbExclamation, "Error encountered in cmdButton 2" EndCode: End Sub |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Compatibility problem?
thanks Bob, I'll try it out
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Compatibility Checker Problem | Excel Discussion (Misc queries) | |||
URGENT: Mac/PC Macro compatibility problem | Excel Programming | |||
URGENT Mac/PC macro compatibility problem | Excel Discussion (Misc queries) | |||
Problem with VBA compatibility - Excel 2003 | Excel Programming | |||
Problem with VBA compatibility - Excel 2003 | Excel Programming |