Click here to Skip to main content
16,004,969 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: BackgroundWorker help Pin
Paul .12-Jul-07 8:02
Paul .12-Jul-07 8:02 
GeneralRe: BackgroundWorker help Pin
nlarson1112-Jul-07 8:04
nlarson1112-Jul-07 8:04 
GeneralRe: BackgroundWorker help Pin
Paul .12-Jul-07 8:13
Paul .12-Jul-07 8:13 
GeneralRe: BackgroundWorker help Pin
Dave Kreskowiak12-Jul-07 8:48
mveDave Kreskowiak12-Jul-07 8:48 
QuestionRemove an item from a combo box bound to a bindingsource Pin
steve_rm12-Jul-07 6:47
steve_rm12-Jul-07 6:47 
AnswerRe: Remove an item from a combo box bound to a bindingsource Pin
Christian Graus12-Jul-07 6:51
protectorChristian Graus12-Jul-07 6:51 
Questionusing Word.Document's SaveAs Function (VB6) Pin
reegan4112-Jul-07 6:15
reegan4112-Jul-07 6:15 
AnswerRe: using Word.Document's SaveAs Function (VB6) Pin
Thomas Chester12-Jul-07 8:56
Thomas Chester12-Jul-07 8:56 
According to the SaveAs help documentation the default behaviour is to overwrite without prompting. What you can do is test to see if the file your are going to save as already exists, and then do something to select another name. In the code example below, if the file "c:\test.doc" exists the while loop will try for "c:\test_1.doc". If that file exists, it will then try for "c:\test_2.doc" and so on.

<br />
Dim I                 As Long<br />
Dim SaveAsFileName    As String<br />
Dim NewSaveAsFileName As String<br />
<br />
SaveAsFileName = "c:\Test.doc"<br />
NewSaveAsFileName = SaveAsFileName<br />
<br />
While Dir(NewSaveAsFileName, vbNormal) <> ""<br />
<br />
  I = I + 1<br />
  NewSaveAsFileName = Left(SaveAsFileName, Len(SaveAsFileName) - 4) & "_" & i & _<br />
      Right(SaveAsFileName, 4)<br />
<br />
Wend<br />

QuestionBoxing/Unboxing Performance Pin
hrodberaht12-Jul-07 6:09
hrodberaht12-Jul-07 6:09 
AnswerRe: Boxing/Unboxing Performance Pin
Christian Graus12-Jul-07 6:12
protectorChristian Graus12-Jul-07 6:12 
AnswerRe: Boxing/Unboxing Performance Pin
Luc Pattyn12-Jul-07 6:31
sitebuilderLuc Pattyn12-Jul-07 6:31 
AnswerRe: Boxing/Unboxing Performance Pin
Dave Kreskowiak12-Jul-07 7:11
mveDave Kreskowiak12-Jul-07 7:11 
AnswerRe: Boxing/Unboxing Performance Pin
Guffa12-Jul-07 7:23
Guffa12-Jul-07 7:23 
AnswerRe: Boxing/Unboxing Performance [modified] Pin
Dave Kreskowiak12-Jul-07 8:19
mveDave Kreskowiak12-Jul-07 8:19 
AnswerRe: Boxing/Unboxing Performance Pin
hrodberaht12-Jul-07 10:14
hrodberaht12-Jul-07 10:14 
QuestionCheck file existence on FTP Pin
Paul .12-Jul-07 5:03
Paul .12-Jul-07 5:03 
AnswerRe: Check file existence on FTP Pin
Dave Kreskowiak12-Jul-07 5:35
mveDave Kreskowiak12-Jul-07 5:35 
AnswerRe: Check file existence on FTP Pin
Paul .12-Jul-07 5:38
Paul .12-Jul-07 5:38 
AnswerRe: Check file existence on FTP Pin
Vasudevan Deepak Kumar13-Jul-07 0:17
Vasudevan Deepak Kumar13-Jul-07 0:17 
QuestionUsername from network issue in VB Pin
Ajit Sandhu12-Jul-07 4:55
Ajit Sandhu12-Jul-07 4:55 
AnswerRe: Username from network issue in VB Pin
Dave Kreskowiak12-Jul-07 4:58
mveDave Kreskowiak12-Jul-07 4:58 
GeneralRe: Username from network issue in VB Pin
Ajit Sandhu12-Jul-07 5:02
Ajit Sandhu12-Jul-07 5:02 
GeneralRe: Username from network issue in VB Pin
Dave Kreskowiak12-Jul-07 5:30
mveDave Kreskowiak12-Jul-07 5:30 
AnswerRe: Username from network issue in VB Pin
Vasudevan Deepak Kumar13-Jul-07 0:16
Vasudevan Deepak Kumar13-Jul-07 0:16 
Question[Message Deleted] Pin
shri_khamitkar12-Jul-07 4:32
shri_khamitkar12-Jul-07 4:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.