The Andrew N. Wiggins Consultancy

Contact me at webmaster@anw.biz

Experimental Site

 

This site designed by Byg Software Ltd

 

The ANW.BIZ Home Page
Up

How do I ...

Stop a user from saving?
Put this code in the "ThisWorkbook" module:
 
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
    Cancel = True
End Sub
 
.. Have leading zeros before a number, such as:

so 123 becomes
000123

Select the cell or range then, from the menu,
  • Format > Cells >Number
  • Select "Custom" category
  • Type 000000 into the "Type:" box.
 
.. Enter numbers in 24 hour clock time so that 0800 displays as 08:00?
 
  • Format > Cells >Number
  • Select "Custom" category
  • Type 00\:00 into the "Type:" box.
 
.. Get repeating characters in VBA?
  • Use "String"
  • String(10,"X") will repeat "X" ten times
 
.. Get repeating characters using a worksheet formula?
  • Use =REPT
  • =REPT("Abc",12) shows as:
  • AbcAbcAbcAbcAbcAbcAbcAbcAbcAbcAbcAbc
 
Increase all the numbers in a range by 10?
  • Put 10 in a convenient cell and copy it.
  • Select the range you want to change.
  • Edit > Paste Special : Add
 
Insert a new sheet in my current workbook?
  • Hold down Shift and press F11
 
Is there a short cut to create a chart?
  • Press F11 will create a chart and start the wizard.
 
 
 
 
   
 
 
   

Published: 19 January 2004
Last edited: 04 August 2005 11:59