Home |
Search |
Today's Posts |
#8
![]()
Posted to microsoft.public.excel.setup
|
|||
|
|||
![]()
I don't see any place where you tried to unprotect the worksheet.
But even if your code actually includes those lines, I still don't have a guess why they wouldn't unprotect the sheet. Valter wrote: Hi Dave, now that's way above me :) not quite sure what should I answer, but here is the whole code. Sub USDPrice() ' ' USDPrice Macro ' ' Sheets("Purchase Order Template").Select Range("H20").Select ActiveCell.FormulaR1C1 = " PRICING IN USD $" Range("G31").Select ActiveCell.FormulaR1C1 = _ "=IF(ISERROR(VLOOKUP(RC[-4],AcronisProducts,3,FALSE)),"""",VLOOKUP(RC[-4],AcronisProducts,3,FALSE))" Range("G31").Select Selection.AutoFill Destination:=Range("G31:G36") Range("G31:G36").Select Range("H31").Select ActiveCell.FormulaR1C1 = _ "=IF(ISERROR(VLOOKUP(RC[-5],AcronisProducts,10,FALSE)),"""",VLOOKUP(RC[-5],AcronisProducts,10,FALSE))" Range("H31").Select Selection.AutoFill Destination:=Range("H31:H36") Range("H31:H36").Select Range("G31:H36,J31:J37").Select Range("J31").Activate Selection.NumberFormat = "[$$-409]#,##0.00" Range("D11:F11").Select Sheets("Settings").Select Range("I5").Select End Sub Sub EUROPrice() ' ' EUROPrice Macro ' ' Sheets("Purchase Order Template").Select Range("H20").Select ActiveCell.FormulaR1C1 = " PRICING IN EURO ぎ" Range("G31").Select ActiveCell.FormulaR1C1 = _ "=IF(ISERROR(VLOOKUP(RC[-4],AcronisProducts,4,FALSE)),"""",VLOOKUP(RC[-4],AcronisProducts,4,FALSE))" Range("G31").Select Selection.AutoFill Destination:=Range("G31:G36") Range("G31:G36").Select Range("H31").Select ActiveCell.FormulaR1C1 = _ "=IF(ISERROR(VLOOKUP(RC[-5],AcronisProducts,11,FALSE)),"""",VLOOKUP(RC[-5],AcronisProducts,11,FALSE))" Range("H31").Select Selection.AutoFill Destination:=Range("H31:H36") Range("H31:H36").Select Range("G31:H36,J31:J37").Select Range("J31").Activate Selection.NumberFormat = "#,##0.00_- [$ぎ-1]" Range("D11:F11").Select Sheets("Settings").Select Range("I5").Select End Sub Sub POUNDPrice() ' ' POUNDPrice Macro ' ' Sheets("Purchase Order Template").Select Range("H20").Select ActiveCell.FormulaR1C1 = " PRICING IN UK POUND ツ」" Range("G31").Select ActiveCell.FormulaR1C1 = _ "=IF(ISERROR(VLOOKUP(RC[-4],AcronisProducts,5,FALSE)),"""",VLOOKUP(RC[-4],AcronisProducts,5,FALSE))" Range("G31").Select Selection.AutoFill Destination:=Range("G31:G36") Range("G31:G36").Select Range("H31").Select ActiveCell.FormulaR1C1 = _ "=IF(ISERROR(VLOOKUP(RC[-5],AcronisProducts,12,FALSE)),"""",VLOOKUP(RC[-5],AcronisProducts,12,FALSE))" Range("H31").Select Selection.AutoFill Destination:=Range("H31:H36") Range("H31:H36").Select Range("G31:H36,J31:J37").Select Range("J31").Activate Selection.NumberFormat = "[$ツ」-809]#,##0.00" Range("D11:F11").Select Sheets("Settings").Select End Sub hope this makes some sense :) -- Dave Peterson |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how to enable a macro in protected sheet | Excel Discussion (Misc queries) | |||
Macro Error when Sheet is Protected | Excel Discussion (Misc queries) | |||
macro on protected sheet-error | Excel Discussion (Misc queries) | |||
use macro button to run macro in protected sheet | Excel Discussion (Misc queries) | |||
How can you create a macro on a protected sheet? | Excel Discussion (Misc queries) |