Thread: Excel virus?
View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
NZuser NZuser is offline
external usenet poster
 
Posts: 13
Default Excel virus?

Wow, thanks!! It's nearly working!!! I did everything you said and it is
automatically hiding the usage worksheet and populating the cells with the
user and date etc when I make a change, the only thing it's not showing is
the actual changes, it's putting in things like $A$4, what does that mean?

"Simon Lloyd" wrote:


Ah!, its not a worksheet event code its Workbook event
*How to Save a Workbook Event Macro*
1. *Copy* the macro using *CTRL+C* keys.
2. Open your Workbook and *Right Click* on any *Worksheet's Name Tab*
3. *Left Click* on *View Code* in the pop up menu.
4. Press *ALT+F11* keys to open the *Visual Basic Editor.*
5. Press *CTRL+R* keys to shift the focus to the *Project Explorer
Window*
6. Press the *Down Arrow Key* until *ThisWorkbook* is highlighted in
blue.
7. *Press* the *Enter* key to move the cursor to the *Code Window*
8. *Paste* the macro code using *CTRL+V*
9. *Save* the macro in your Workbook using *CTRL+S*

NZuser;308620 Wrote:
It's not working, I added another w/sheet in the same s/sheet called
Usage
then
right clicked on the 'Usage' w/sheet tab, selected 'view code' and
pasted in
your code below - is this correct?

"Simon Lloyd" wrote:


You can create a sheet called Usage, make the sheet

xlsheetveryhidden,
then paste this in the Thisworkbook code module,
Private Sub Workbook_SheetSelectionChange(ByVal Sh As
Object, ByVal Target As Range)
Application.screenupdating= false
Worksheets("usage").Visible = False
If Worksheets("Usage").Visible = True Then
Exit Sub
End If
With ThisWorkbook.Worksheets("usage").Cells(Rows.Count,

"A").End(xlUp)
.offset(1, 0).Value = Target.Text & Target.Address
.offset(1, 1).Value = Sh.Name
.offset(1, 2).Value = Format(Now, "dd mmm yyyy, hh:mm")
.offset(1, 3).Value = Application.UserName
End With
Application.screenupdating= true
End Sub

Now when a user changes something the action will be recorded

including
which cell and content!


NZuser;308511 Wrote:
Hello,
I work with a s/sheet that a few other users have access to, every

now
and
then really old data seems to come back into the s/sheet - data

that
had been
deleted from it weeks ago?? How is this possible? How do I check to

see
if
the s/sheet has a virus?
:-)


--
Simon Lloyd

Regards,
Simon Lloyd
'The Code Cage' ('http://www.thecodecage.com'

(http://www.thecodecage.com/))

------------------------------------------------------------------------
Simon Lloyd's Profile:

'http://www.thecodecage.com/forumz/member.php?userid=1'
(http://www.thecodecage.com/forumz/member.php?userid=1)
View this thread:

'http://www.thecodecage.com/forumz/showthread.php?t=86247'
(http://www.thecodecage.com/forumz/sh...ad.php?t=86247)




--
Simon Lloyd

Regards,
Simon Lloyd
'The Code Cage' (http://www.thecodecage.com)
------------------------------------------------------------------------
Simon Lloyd's Profile: http://www.thecodecage.com/forumz/member.php?userid=1
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=86247