OK, I had to revert to something that would change the Revision number for me. While this code works for me, use it at your own risk.<br><br>Option Explicit<br><br>Public Sub Main()<br> Dim strBuffer As String, strNewString As String, strFilename As String<br> Dim intRevision As Integer, intFileHandle As Integer<br> Dim lOffset As Long<br> <br> On Error GoTo MainErr:<br> <br> strFilename = Command<br> <br> If strFilename = "" Then<br> MsgBox "Usage: AutoRev <Project.VBP>"<br> Exit Sub<br> End If<br> <br> If Dir$(strFilename) = "" Then<br> MsgBox "File not found: " & strFilename<br> Exit Sub<br> End If<br> <br> intFileHandle = FreeFile<br> <br> Open strFilename For Binary As #intFileHandle<br> <br> strBuffer = String(LOF(intFileHandle), 0)<br> Get #intFileHandle, 1, strBuffer<br> <br> 'Make sure we want to auto-increment.<br> lOffset = InStr(1, strBuffer, "AutoIncrementVer=1"

<br> If lOffset > 0 Then<br> <br> lOffset = InStr(1, strBuffer, "RevisionVer="

<br> strNewString = Mid$(strBuffer, 1, lOffset + 11)<br> <br> intRevision = CInt(Mid$(strBuffer, lOffset + 12, InStr(lOffset + 12, strBuffer, vbCrLf) - (lOffset + 12)))<br> intRevision = intRevision + 1<br> <br> 'Make sure we stay within the limits of VB's versioning.<br> If intRevision > 9999 Then<br> intRevision = 0<br> End If<br> <br> 'Build the new project file to write.<br> strNewString = strNewString & CStr(intRevision) & Mid$(strBuffer, InStr(lOffset + 12, strBuffer, vbCrLf))<br> End If<br> <br> 'Write the updated information back to the VBP.<br> Put #intFileHandle, 1, strNewString<br> <br> Close #intFileHandle<br> <br> Exit Sub<br> <br>MainErr:<br> MsgBox "Error #" & Err.Number & vbCrLf & Err.Description<br>End Sub <p>Steve<br><a href=mailto:tribesaddict@swbell.net>tribesaddict@swbell.net</a><br><a href= > </a><br>