How to stop FLASH in Excel.

manikm

New Member
Joined
Feb 2, 2003
Messages
14
Hi guys,

There seems to be "new" fad at the moment - embedded macromedia "FLASH" games in Excel worksheets.

This is potentially dangerous to our corporate network. :confused:

Would anyone know how to stop these from opening, or explain how its done, so i can reverse engineer it?

Many thanks for your time and help!! :biggrin:
 

Some videos you may like

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.

Joe Was

MrExcel MVP
Joined
Feb 19, 2002
Messages
7,539
Block or delete any files with the extention: .swf

This is UserForm Code for the ShockWave Control:

Private Sub UserForm_Activate()

Me.ShockwaveFlash1.Movie = ThisWorkbook.Path & Application.PathSeparator & "WhatEverFile.swf"
End Sub
 

manikm

New Member
Joined
Feb 2, 2003
Messages
14
Thanks for your reply.

The problem is that the extensions are .xls

We already block .swf's

Is there an option in Excel, or a macro we could autorun upon loading Excel to stop embedded .swf's working?

Many thanks!
:)
 

Joe Was

MrExcel MVP
Joined
Feb 19, 2002
Messages
7,539
As far as I know to use the Flash Player Object in Excel you still need a flash file, like: "WhatEverFile.swf" to use it?

I think it can be wraped as an object though, like you can do with photo objects, this way the photo files do not need to be included with the xls. So, maybe the swf movie file is working the same way. I don't think you can stop it if it is being done this way.

You can write a macro to remove any workbook that contains the file though.
 

manikm

New Member
Joined
Feb 2, 2003
Messages
14

ADVERTISEMENT

Joe,

If we went down the macro route - could I use a wildcard, so that it would remove any .swf file \ shockwave content?

What would the macro contain if this is the case?

Many thanks!
 

Joe Was

MrExcel MVP
Joined
Feb 19, 2002
Messages
7,539
You can put the workbook that has this code anywhere, but before you run the code you need to select the folder that you want to search. Use the SaveAs utility select the folder and then cancel the SaveAs.

This will only check for sheet controls. It will not search modules for UserForns with the controls embeded. The code could be cleaned up and improved, but it works. I tested it.


Sub allFilesSearch()
'Standard Module code, like: Module1!
Dim f%, foundNum%
Dim ws As Worksheet
Dim Found As Range
Dim FirstAddress$, thisLoc$, rngNm$, AddressStr$
Dim obj As Object, myStr$, myDFFE
Dim myWb, fs, myFlie

Application.ScreenUpdating = False

With Application.FileSearch
.NewSearch

'Option: Search Sub-Folders as well?
.SearchSubFolders = False 'Option: True or False!

'Option Current Folder or a defined folder?
'myDFFE = Application.GetOpenFilename
'.LookIn = myDFFE
'Or
.LookIn = CurDir
'Or
'.LookIn = "U:\My_Documents\Excel\Test\Fix\"

'Option: Only Search this type of file?
.Filename = "*.xls"
.Execute

For f = 1 To .FoundFiles.Count
Set Wb = Workbooks.Open(Filename:=.FoundFiles(f))

For Each ws In Wb.Worksheets
For Each obj In ActiveSheet.OLEObjects
If (Left(obj.Name, 9) = "Shockwave" Or Left(obj.Name, 5) = "Flash") Then myFlag = True
p = p + 1
Next obj
Next ws

If myFlag = True Then
myWb = Wb.FullName
ActiveWorkbook.Save
ActiveWorkbook.Close

Set fs = CreateObject("Scripting.FileSystemObject")
Set myFile = fs.GetFile(myWb)
myFile.Delete
myFlag = False
p = 0
Else

ActiveWorkbook.Save
ActiveWorkbook.Close
End If
Next f
End With

Application.ScreenUpdating = True
End Sub
 

manikm

New Member
Joined
Feb 2, 2003
Messages
14

ADVERTISEMENT

Joe,

Thanks so much for all your help.

The main problem we have, is that these files are sitting in people inboxes, OR saved anywhere on the network.

People are loading them directly as attachments, or loading them from anywhere they have saved them to from their emails.

Do you think theres anything we can do to stop this.

I have read, that this is a virus threat also which is even more of a worry for us IT administrators.

I just hope MS release a patch.

See here:
_http://www.securiteam.com/windowsntfocus/5TP0M0KIUA.html

Thanks again Joe for your time!! :biggrin:
 

Joe Was

MrExcel MVP
Joined
Feb 19, 2002
Messages
7,539
Sounds like you need a server-side program. This is a Job for C++. You may check the C sites?

The Flash problem has been around for some time. As code can be attached, it is a bigger problem than the Real Player spy-ware problems, but just as hard to fix.
 

manikm

New Member
Joined
Feb 2, 2003
Messages
14
Hi again Joe,

Yeah - i have dabbled in permission'ing off the .ocx file that Flash uses.

I have found that if you browse to the file C:\WINDOWS\system32\Macromed\Flash\Flash8b.ocx

and then change the permission on it (NTFS only) to allow \ deny only certain users - then this method does work.

BUT - this stops genuine business flash websites from working.

(see another thead i created here:
http://www.tek-tips.com/viewthread.cfm?qid=1277746&page=1 )

:eek:/

Many thanks.
 

Watch MrExcel Video

Forum statistics

Threads
1,112,802
Messages
5,542,585
Members
410,561
Latest member
Sasha Lawrence
Top