Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 05-26-2022, 06:20 AM
abonsey abonsey is offline replace cell text results in extra carriage return Windows 11 replace cell text results in extra carriage return Office 2021
Novice
replace cell text results in extra carriage return
 
Join Date: May 2022
Posts: 6
abonsey is on a distinguished road
Default replace cell text results in extra carriage return

I have a snippet of vba to insert a mixture of variable, other cell values and static text into a new cell

Looking at the code below the result is the variable 'FullBoxes' and the contents from 'ActiveDocument.Tables(1).Cell(1, 3).Range' are on one line but the wording "containing" begins on another line.

What causes that and how do I stop what is effectively a carriage return being applied.

TIA

With ActiveDocument.Tables(1).Cell(i, 3).Range
.Font.Name = "Arial"
.Font.Size = 10
If Remaining > 0 Then
.Text = FullBoxes & " " & ActiveDocument.Tables(1).Cell(1, 3).Range & " containing "

Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to split values from carriage-return from the cell ganesang Excel 3 12-02-2019 07:16 AM
replace cell text results in extra carriage return Find / Replace hard Carriage Return with Line break. GreenBoy Word 2 03-11-2018 02:32 AM
carriage return on PPT yangthomson PowerPoint 0 04-21-2016 07:16 PM
Adding a carriage return at end of each line, and then a blank space, after text entry complete CEMurphy4 Word VBA 1 12-02-2015 11:53 PM
Plain Text Content Control - Losing Styling on Carriage Return kintap Word 0 07-16-2014 12:43 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:17 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft