Best Blogging Tips and Templates,Windows Hacks: “How to Extract Flash from Excel Sheet Using VBA (Macro)” plus 1 more

Best Blogging Tips and Templates,Windows Hacks: “How to Extract Flash from Excel Sheet Using VBA (Macro)” plus 1 more

Link to Blogger Tips and Hacks | Best Blogger Templates | SEO Tips and Tricks

How to Extract Flash from Excel Sheet Using VBA (Macro)

Posted: 01 Aug 2010 06:22 AM PDT


Today my friend come to me and give me one excel file which contains one .swf (Shockwave Flash) file, flash game within that excel sheet. He want that game into his PC and i thought that what if i extract that flash from that excel sheet and give him the .swf file so he can play that game in his browser (ex: mozilla firefox). Now my question is how to extract Macromedia flash file from MS excel worksheet.

Extract Flash from Excel File

I have searched for how to extract flash from the excel sheet and came across a very good VBA code (Macro) which has worked for me. The Macro is providing the facility to extract the flash file from my excel sheet and also had given me the facility to save it to my hard disk.
Below here is a Macro for saving the .swf (flash) file from any excel sheet whether it is excel 2003, excel 2007 or excel 2010 :)

Steps to Save flash file from Excel sheet

  1. Open a Microsoft Excel Workbook which contains flash within it.
  2. Press the ALT+ F11 Key from keyboard to bring up the VBA editor (Double click on your excel spread sheet from left side , which contains flash).
  3. Paste the below given code and press F5 Key from keyboard.
  4. Sub ExtractFlash()
    Dim tmpFileName As String
    Dim FileNumber As Integer
    Dim myFileId As Long
    Dim MyFileLen As Long
    Dim myIndex As Long
    Dim swfFileLen As Long
    Dim i As Long
    Dim swfArr() As Byte
    Dim myArr() As Byte
    tmpFileName = Application.GetOpenFilename("MS Office File (*.doc;*.xls), *.doc;*.xls", , "Open MS Office file")
    If tmpFileName = "False" Then Exit Sub
    myFileId = FreeFile
    Open tmpFileName For Binary As #myFileId
    MyFileLen = LOF(myFileId)
    ReDim myArr(MyFileLen - 1)
    Get myFileId, , myArr()
    Close myFileId
    Application.ScreenUpdating = False
    i = 0
    Do While i < MyFileLen
    If myArr(i) = &H46 Then
    If myArr(i + 1) = &H57 And myArr(i + 2) = &H53 Then
    swfFileLen = CLng(&H1000000) * myArr(i + 7) + CLng(&H10000) * myArr(i + 6) + CLng(&H100) * myArr(i + 5) + myArr(i + 4)
    ReDim swfArr(swfFileLen - 1)
    For myIndex = 0 To swfFileLen - 1
    swfArr(myIndex) = myArr(i + myIndex)
    Next myIndex
    Exit Do
    Else
    i = i + 3
    End If
    Else
    i = i + 1
    End If
    Loop
    myFileId = FreeFile
    tmpFileName = Left(tmpFileName, Len(tmpFileName) - 4) & ".swf"
    Open tmpFileName For Binary As #myFileId
    Put #myFileId, , swfArr
    Close myFileId
    MsgBox "Save the extracted SWF Flash as [ " & tmpFileName & " ]"
    End Sub
  5. Open your excel sheet from which you need to extract flash object.

Save the flash at your desired location and done, Hope you have like the macro and enjoy your flash file playing :)

BitDefender Internet Security 2010 license for 90 days : Free

Posted: 01 Aug 2010 06:01 AM PDT


BitDefender Internet Security 2010 keeps your Internet-connected family safe, without slowing down their PCs. It locks out viruses, hackers & spam, while providing parental control and firewall protection.

Free BitDefender Internet Security 2010 license

Protects against viruses and other malware using industry-leading technologyNEW, Prevents personal information from leaking via e-mail, Web or instant messagingNEW, Instant Messaging Encryption keeps your conversations private on Yahoo! and MSN Messenger, The two-way firewall automatically secures your Internet connection wherever you are, Parental Control blocks access to inappropriate websites and e-mail, and many more advantages.




Features and Benefits
  1. Antivirus: Confidently download, share and open files from friends, family, co-workers - and even total strangers
  2. Antispyware: Protect your identity: shop, bank, listen and watch, privately and securely
  3. IM Encryption: Guard your conversations with top-of-the line encryption
  4. Game Mode: Play safely, play seamlessly
  5. Firewall: Get fine-tuned performance from your computer

Malware city is offering free 90 days valid genuine licenses of BitDefender Internet Security 2010 so, Download the promotional license of latest BitDefender Internet Security.

Download BitDefender Internet Security 2010 License for 90 days
See more details: http://www.malwarecity.com/site/DownloadBitDefender2010/2454918

Post a Comment

Adsense Fortunes

Let's Learn

New Skills

  © Blogger template Shush by Ourblogtemplates.com 2009

Back to TOP