Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Is it possible to create a patch or update an Excel Program?


I created a spreadsheet that has been widely distributed (well 20-30
people) and I came across a bug in my code. The bug was an easy fix
but I have no way to update all the distributed programs without a
complete mess.

Is there a way to do this?

Thanks ahead of time!


--
ynotravid
------------------------------------------------------------------------
ynotravid's Profile: http://www.excelforum.com/member.php...o&userid=13476
View this thread: http://www.excelforum.com/showthread...hreadid=498976

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Is it possible to create a patch or update an Excel Program?

1. Create a new .xls file with the revision number in the filename.
2. e-mail the new file to your recipients
--
Gary's Student


"ynotravid" wrote:


I created a spreadsheet that has been widely distributed (well 20-30
people) and I came across a bug in my code. The bug was an easy fix
but I have no way to update all the distributed programs without a
complete mess.

Is there a way to do this?

Thanks ahead of time!


--
ynotravid
------------------------------------------------------------------------
ynotravid's Profile: http://www.excelforum.com/member.php...o&userid=13476
View this thread: http://www.excelforum.com/showthread...hreadid=498976


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Is it possible to create a patch or update an Excel Program?


Gary's Student,

Would the receiver of this new file have to copy and paste his dat
from the old file into the new file? Or would the new file and ol
file merge without having to copy/paste and without losing any of th
data

--
securityma
-----------------------------------------------------------------------
securityman's Profile: http://www.excelforum.com/member.php...nfo&userid=882
View this thread: http://www.excelforum.com/showthread.php?threadid=49897

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Is it possible to create a patch or update an Excel Program?


um... yeah. I guess should have mentioned that there is a ton of data.
Just getting the data transfered properly to a new version takes a
couple hours.


--
ynotravid
------------------------------------------------------------------------
ynotravid's Profile: http://www.excelforum.com/member.php...o&userid=13476
View this thread: http://www.excelforum.com/showthread...hreadid=498976

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Is it possible to create a patch or update an Excel Program?


if the only change is in the modules, than u could just export them and
then import the new code into the existing xls files. you could probly
write a macro that would do it for the user.


--
TheIrishThug
------------------------------------------------------------------------
TheIrishThug's Profile: http://www.excelforum.com/member.php...o&userid=29682
View this thread: http://www.excelforum.com/showthread...hreadid=498976



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Is it possible to create a patch or update an Excel Program?


Irish, you are brilliant!

I'm off to try to figure out how.

Thanks for the suggestion!


--
ynotravid
------------------------------------------------------------------------
ynotravid's Profile: http://www.excelforum.com/member.php...o&userid=13476
View this thread: http://www.excelforum.com/showthread...hreadid=498976

  #7   Report Post  
Posted to microsoft.public.excel.programming
N10 N10 is offline
external usenet poster
 
Posts: 141
Default Is it possible to create a patch or update an Excel Program?

HI

Another way, which I use. is to automate Outlook. There are several Outlook
addins available which will automatically save attachments which meet
predefined criteri and thus over write the older version of the file.
Speery do one Im certain there are others.

Hope this helps

N10


"ynotravid" wrote
in message ...

Irish, you are brilliant!

I'm off to try to figure out how.

Thanks for the suggestion!


--
ynotravid
------------------------------------------------------------------------
ynotravid's Profile:
http://www.excelforum.com/member.php...o&userid=13476
View this thread: http://www.excelforum.com/showthread...hreadid=498976



  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Is it possible to create a patch or update an Excel Program?


Thanks for the input guys.

Couldn't figure a way to make the import/export work. So I'm trying t
do it by exporting to a .csv. file and then importing it on the othe
end. Not fun, but at least I know it can be done.

Thanks again guys

--
ynotravi
-----------------------------------------------------------------------
ynotravid's Profile: http://www.excelforum.com/member.php...fo&userid=1347
View this thread: http://www.excelforum.com/showthread.php?threadid=49897

  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 92
Default Is it possible to create a patch or update an Excel Program?

I have used the following to export a project to files and import into a
new workbook.

Note that you need to reference Microsoft Scripting Runtime and
Microsoft Visual Basic for Applications.

First, export the project from the lastest addition of your project
using the ExportProject macro. Second, open a new workbook and import
the ExportProjectModule.bas. Delete the ExportProjectModule.bas from
the "VBACode" directory so it doesn't get imported twice. Lastly run
the ImportProject macro.

I'm sure there's room for improvment on this, but I've gotten lazy.

Also I haven't found a way to delete modules from an existing workbook.
If any one know how, please let me know.

Attribute VB_Name = "ExportProjectModule"
Option Explicit

' Requires Microsoft Scripting Runtime
' Requires Microsoft Visual Basic for Applications Extensibility

Private Enum FILE_TYPE
MODULE_TYPE = 1
CLASS_TYPE = 2
FORM_TYPE = 3
End Enum

Const strPath = "C:\RPP\Test\VBACode\"

Public Sub ExportProject()

Dim fsoFileSystemObject As FileSystemObject
Dim vbComp As VBComponent

Set fsoFileSystemObject = CreateObject("Scripting.FileSystemObject")
If Not fsoFileSystemObject.FolderExists(strPath) Then
MsgBox "Folder does not exist <" + strPath + ""
Exit Sub
End If

For Each vbComp In ThisWorkbook.VBProject.VBComponents
Select Case vbComp.Type
Case FILE_TYPE.MODULE_TYPE
vbComp.Export strPath + vbComp.Name + ".bas"
Case FILE_TYPE.CLASS_TYPE
vbComp.Export strPath + vbComp.Name + ".cls"
Case FILE_TYPE.FORM_TYPE
vbComp.Export strPath + vbComp.Name + ".frm"
End Select
Next

Set fsoFileSystemObject = Nothing
Set vbComp = Nothing

End Sub

Public Sub ImportProject()

Dim fsoFileSystemObject As FileSystemObject
Dim fFolder As Folder
Dim fFile As File
Dim vbComp As VBComponent

Set fsoFileSystemObject = CreateObject("Scripting.FileSystemObject")
If Not fsoFileSystemObject.FolderExists(strPath) Then
MsgBox "Folder does not exist <" + strPath + ""
Exit Sub
End If
Set fFolder = fsoFileSystemObject.GetFolder(strPath)

For Each fFile In fFolder.Files
If fFile.Name = "ExportProjectModule.bas" Then
' Skip this file
ElseIf InStr(fFile.Name, ".bas") Then
ThisWorkbook.VBProject.VBComponents.Import strPath + "\" +
fFile.Name
ElseIf InStr(fFile.Name, ".cls") Then
ThisWorkbook.VBProject.VBComponents.Import strPath + "\" +
fFile.Name
ElseIf InStr(fFile.Name, ".frm") Then
ThisWorkbook.VBProject.VBComponents.Import strPath + "\" +
fFile.Name
End If
Next

Set fsoFileSystemObject = Nothing
Set fFolder = Nothing
Set fFile = Nothing
Set vbComp = Nothing

End Sub



*** Sent via Developersdex http://www.developersdex.com ***
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel patch whacky Lark Excel Discussion (Misc queries) 1 September 6th 08 02:58 AM
Why does my excel program create a .xls:1 extension? Laura Excel Discussion (Misc queries) 2 April 12th 05 10:16 PM
Excel fun patch [email protected] Excel Discussion (Misc queries) 0 March 23rd 05 03:20 AM
Is there a way to create a program in excel to compare files? bruce Excel Programming 7 June 5th 04 07:58 PM
creating a 'patch' for excel workbooks Scott Excel Programming 1 August 27th 03 02:57 PM


All times are GMT +1. The time now is 10:00 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"