Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default Deleting a row in a message (opposite to VbCrLf)

Hi,

I am interested in deleting a blank row in a message. I know that if I
want to add a row I use the command VbCrLf, but is there one to delete
a row?

Any help/suggestions greatly appreciated.

Regards

Peder
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default Deleting a row in a message (opposite to VbCrLf)

Maybe you need to show your code, but perhaps something like this:

Dim strMsg as string

strMsg = "message" & vbcrlf & "with linebreak"

strMsg = Replace(strMsg, vbcrlf, vbnullstring)

Msgbox strMsg


RBS


"Wesslan" wrote in message
...
Hi,

I am interested in deleting a blank row in a message. I know that if I
want to add a row I use the command VbCrLf, but is there one to delete
a row?

Any help/suggestions greatly appreciated.

Regards

Peder


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default Deleting a row in a message (opposite to VbCrLf)

RB Smissaert,

Sorry I should have showed the code right away. You suggestion is a
good one, however in my case it will lead to that all my VbCrLf are
replaced with nothing. Hence I loose all my row breaks ;)

The code is:

Sub Top3Peers()
ttext = ""
SelectRow = 10

For i = 1 To 3

SPI = wbook1.Worksheets("Global - " & strSize & "
Cap").Range("N" & SelectRow).Value
SPI = Round(SPI)

' The company analysed is not to be part of peers
If Application.Proper$(wbook1.Worksheets(Sht).Range(" C" &
SelectRow).Value) = Company Then SelectRow = SelectRow + 1

ttext = ttext & Application.Proper$
(wbook1.Worksheets(Sht).Range("C" & SelectRow).Value) & " (SPI " & SPI
& ")"
ttext = ttext & vbCrLf
SelectRow = SelectRow + 1
Next i
oPPTApp.ActiveWindow.Selection.SlideRange.Shapes(R ectangle).Select

oPPTApp.ActiveWindow.Selection.ShapeRange.GroupIte ms(Index:=strIndex).TextFrame.TextRange.Characters (Start:=1,
Length:=250).Select
oPPTApp.ActiveWindow.Selection.TextRange.Text = ttext

End Sub

I am looping and for earch firm and result that is taken in, a new
line is created. However, when the loop finishes there will naturally
be one too many. Any suggestions?

Regards,
Peder
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default Deleting a row in a message (opposite to VbCrLf)

Simpy replace this:

ttext = ttext & vbCrLf

with this:

If i < 3 then
ttext = ttext & vbCrLf
end if


RBS

"Wesslan" wrote in message
...
RB Smissaert,

Sorry I should have showed the code right away. You suggestion is a
good one, however in my case it will lead to that all my VbCrLf are
replaced with nothing. Hence I loose all my row breaks ;)

The code is:

Sub Top3Peers()
ttext = ""
SelectRow = 10

For i = 1 To 3

SPI = wbook1.Worksheets("Global - " & strSize & "
Cap").Range("N" & SelectRow).Value
SPI = Round(SPI)

' The company analysed is not to be part of peers
If Application.Proper$(wbook1.Worksheets(Sht).Range(" C" &
SelectRow).Value) = Company Then SelectRow = SelectRow + 1

ttext = ttext & Application.Proper$
(wbook1.Worksheets(Sht).Range("C" & SelectRow).Value) & " (SPI " & SPI
& ")"
ttext = ttext & vbCrLf
SelectRow = SelectRow + 1
Next i
oPPTApp.ActiveWindow.Selection.SlideRange.Shapes(R ectangle).Select

oPPTApp.ActiveWindow.Selection.ShapeRange.GroupIte ms(Index:=strIndex).TextFrame.TextRange.Characters (Start:=1,
Length:=250).Select
oPPTApp.ActiveWindow.Selection.TextRange.Text = ttext

End Sub

I am looping and for earch firm and result that is taken in, a new
line is created. However, when the loop finishes there will naturally
be one too many. Any suggestions?

Regards,
Peder


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
Deleting Sheet Message Lucia Excel Programming 1 March 13th 07 10:42 PM
VBCRLF not doing anything [email protected] Excel Programming 3 January 16th 07 06:08 PM
Deleting Sheet without message box Mr. T[_2_] Excel Programming 2 January 11th 04 04:25 PM
square boxes when using vbcrlf Joan[_2_] Excel Programming 5 August 5th 03 05:19 PM
Deleting a Prompt Message LC[_2_] Excel Programming 2 July 18th 03 09:46 PM


All times are GMT +1. The time now is 06:35 PM.

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

About Us

"It's about Microsoft Excel"