Thread: Real hard one
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Zygan Zygan is offline
external usenet poster
 
Posts: 1
Default Real hard one


question 1 secure.

You will probably never get them secure but this will stop the average

in vba editor select the sheet you want to protect then insert this
code
Private Sub Worksheet_Activate()
Password = InputBox("Please insert password to view data.", "Password
Checker")
If Password = "insert your password here" Then
'do nothing
Else
Sheets ("insert the sheet name you want it to return to here").select
End If
End Sub


question 2 and 3 in one
open vba editor and insert a module into your workbook and paste this
macro
Sub Macro1()
Sheets("sheet1").Select
Columns("A:A").Select
Selection.Copy
Sheets("Sheet2").Select
Range("A1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Sheets("Sheet3").Select
Range("A1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Sheets("Sheet4").Select
Range("A1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
'etc
'etc
'as many sheets you want or have
' please change the sheet names in the sheets("").select part
End Sub



two options make a button usind

A FORM BUTTON

- right click and asign macro asign macro1


OR


a CONTROL TOOLBOX BUTTON

- double click button after going into deign mode which is a little
button on the toolbar
- and insert this line
call module1.macro1


there she does it all done
hope this helps


--
Zygan
------------------------------------------------------------------------
Zygan's Profile: http://www.excelforum.com/member.php...o&userid=34423
View this thread: http://www.excelforum.com/showthread...hreadid=559342