![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Feb 2002
Location: John G
Posts: 62
|
I have finally found(or at least that's what I think I have found) through much frustration that in 2002 to change the font color sheet and workbook have to be unprotected. I ran my routine as follows:
Private Sub drop_Click() Application.ScreenUpdating = False 'ThisWorkbook.ActiveSheet.Range("A1").Select unprot 'unprotects sheet and workbook Sheets("sheet2").Range("adjshp") = "" Sheets("invoice").Cells(38, 11).Font.Color = RGB(0, 0, 0) ' Sheets("invoice").Cells(38, 10).Font.Color = RGB(0, 0, 0) protect1 'reprotects sheet and workbook Application.ScreenUpdating = True End Sub in both 97 and 2000 with no problem with out using my macros unprot(unprotects workbook and sheet) and protect1 (protects workbook and sheet). In 2002 it crashed on the command to change the font color. Is this the way it is supposed to act? John |
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Feb 2002
Posts: 3,064
|
VBA XP does have changes
suggest writ XP version of the code, sounds silly surposed tobe all OK this is not the case as time is proving. XP has advances but also trips on old code lines??? little ryme to the reason
__________________
Free Excel based Web Toolbar available here. Jack in the UK J & R Excel Solutions "making Excel work for you" |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|