View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
pswanie pswanie is offline
external usenet poster
 
Posts: 247
Default Disable scrolling when macros disabled

copy and paste the following in youre this workbook code

it will when u close it freeze panes and if u open with out macro's enable
keep it freeze(unable to scroll) if macro's enabled it will be able to scroll


Private Sub Workbook_BeforeClose(Cancel As Boolean)
Range("v60").Select
ActiveWindow.FreezePanes = True
End Sub

Private Sub Workbook_Open()
ActiveWindow.FreezePanes = False
End Sub