Click here to Skip to main content
15,925,369 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRead This Pin
Tim Rymer18-Feb-02 5:53
Tim Rymer18-Feb-02 5:53 
GeneralRe: Read This Pin
Volodya Orlenko18-Feb-02 6:10
Volodya Orlenko18-Feb-02 6:10 
GeneralRe: Read This Pin
Tim Rymer18-Feb-02 7:02
Tim Rymer18-Feb-02 7:02 
GeneralRe: Read This Pin
Volodya Orlenko18-Feb-02 7:09
Volodya Orlenko18-Feb-02 7:09 
GeneralSecuring (Licenscing) and ActiveX DLL Pin
noirs12-Feb-02 10:31
noirs12-Feb-02 10:31 
GeneralRe: Securing (Licenscing) and ActiveX DLL Pin
alex.barylski16-Feb-02 14:45
alex.barylski16-Feb-02 14:45 
GeneralWebBrowser Control (version 4 and 5 compatibility) Pin
noirs12-Feb-02 10:29
noirs12-Feb-02 10:29 
Generalfind and replace (simple VBA) Pin
12-Feb-02 6:39
suss12-Feb-02 6:39 
Hello all -- i have a problem that is really getting me down . . .

I am selecting a line in MS Word and trying to remove all double spaces " " and replace them with single spaces -- until I only have single spaces. i.e. " hello world" => " hello world"

I created a _very_ short macro that loops until the selection returns a 'false' value.

Do
Loop Until Selection.Find.Execute(Replace:=wdReplaceOne, ReplaceWith:=" ", FindText:=" ")

After debugging for a while I found that what is happening is that the selection is changing each time -- I tried the following to correct this:

Dim blnEnd As Boolean

With Selection
Do
blnEnd = .Find.Execute(FindText:=" ", ReplaceWith:=" ", Replace:=wdReplaceOne)
Loop While blnEnd = True
End With

but my selection keeps changing just like before -- how do I iterate through a selection that does not change? please help -- this is a killin' me Confused | :confused:

tim

---------------------------------------
Tim Booher
GeneralRe: find and replace (simple VBA) Pin
Volodya Orlenko17-Feb-02 23:16
Volodya Orlenko17-Feb-02 23:16 
Generalcopying objects - newbie question Pin
10-Feb-02 19:40
suss10-Feb-02 19:40 
GeneralRe: copying objects - newbie question Pin
Jeremy Falcon18-Feb-02 9:57
professionalJeremy Falcon18-Feb-02 9:57 
GeneralRe: copying objects - newbie question Pin
Klaus Probst28-Feb-02 10:54
Klaus Probst28-Feb-02 10:54 
GeneralRenaming Developer Studio Toolbars by VB Hooks Pin
6-Feb-02 17:51
suss6-Feb-02 17:51 
GeneralVisual Basic application----Please Help!! Pin
peregrinus6-Feb-02 9:00
peregrinus6-Feb-02 9:00 
GeneralRe: Visual Basic application----Please Help!! Pin
6-Feb-02 11:51
suss6-Feb-02 11:51 
GeneralRe: Visual Basic application----Please Help!! Pin
tppradeep1812-Feb-02 23:10
tppradeep1812-Feb-02 23:10 
QuestionWhat is the way to add something from Flash5 to VB6?? Pin
Ahuva6-Feb-02 8:32
Ahuva6-Feb-02 8:32 
AnswerRe: What is the way to add something from Flash5 to VB6?? Pin
tppradeep1812-Feb-02 23:14
tppradeep1812-Feb-02 23:14 
QuestionHow can I use FSO instructions in my project?? Pin
Ahuva6-Feb-02 8:22
Ahuva6-Feb-02 8:22 
AnswerRe: How can I use FSO instructions in my project?? Pin
Jon Gohr7-Feb-02 3:57
Jon Gohr7-Feb-02 3:57 
GeneralRe: How can I use FSO instructions in my project?? Pin
Ahuva7-Feb-02 4:50
Ahuva7-Feb-02 4:50 
GeneralRe: How can I use FSO instructions in my project?? Pin
Volodya Orlenko7-Feb-02 23:54
Volodya Orlenko7-Feb-02 23:54 
GeneralScrolling the ScrollBars Pin
Firoz4-Feb-02 19:18
Firoz4-Feb-02 19:18 
GeneralRe: Scrolling the ScrollBars Pin
Jeremy Falcon15-Feb-02 11:09
professionalJeremy Falcon15-Feb-02 11:09 
Generalscanner interaction with vb through API or any solution Pin
3-Feb-02 5:28
suss3-Feb-02 5:28 

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.