-
WSRuthieS
AskWoody LoungerI am writing some macros to reformat some Excel files and would like to remove some extra line breaks so that in a cell instead of:
Line 1
Line 2
I have:
Line 1 Line 2I tried removing the line breaks by using:
Cells.Replace What:="vbCrLf", Replacement:=" ", LookAt:=xlPart, SearchOrder _
:=xlByRows, MatchCase:=False, SearchFormat:=False, ReplaceFormat:=False
Cells.Replace What:="vbLf", Replacement:=" ", LookAt:=xlPart, SearchOrder _
:=xlByRows, MatchCase:=False, SearchFormat:=False, ReplaceFormat:=False
But that does absolutely nothing. Anyone got any ideas on why this isn’t working, or how I can do it better? My VBA only gets used every couple years and thus gets very rusty.
-
WSRuthieS
AskWoody LoungerThanks Hans, I knew I had to be making some sort of dummy error. That works perfectly!
-
WSRuthieS
AskWoody LoungerHi Jerry-
Thanks for the tip. I will keep it in mind for the future.
Correct me if I’m wrong, but I think
should be
-
WSRuthieS
AskWoody Loungerul{
margin-left:15px;
padding-left:0;
}
works perfectly! Thanks so much for the help! -
WSRuthieS
AskWoody LoungerOK, thanks Hans!
-
WSRuthieS
AskWoody LoungerOOO, Chocolate!
What tag do you guys use for code? I tried italics last time, but that doesn’t look the same.
-
WSRuthieS
AskWoody LoungerWell, apparently I can use CSS! Just for the heck of it I pasted style tags above my HTML (since the code is not for an entire page there are no head or body tags), and it worked! Well, sort of. The
padding:0;
margin:0;
code takes the text outside of the left line of the box, while padding:1 makes it the same as it was. So, now I’m excited because I can use CSS, which we had always been told we couldn’t, but sadly, I still haven’t got my list working right. -
WSRuthieS
AskWoody LoungerSadly, I cannot use CSS. I have access to the HTML source, but the software I’m using does not allow anything beyond basic HTML (very annoying!).
-
WSRuthieS
AskWoody LoungerBut when you open a pdf and view the first page, wouldn’t that download that page, or does showing the image on the screen have nothing to do with how it prints? I remember back last fall when we were trying to troubleshoot this problem, I’d open the pdf and view all the pages and try to print it, and the same pages would print blank, whether I viewed them or not.
-
WSRuthieS
AskWoody LoungerBut why would that cause mostly first pages of the articles not to print, since those (theoretically, at least) would load before the student would have a chance to view any other pages? It would make sense for the pages that didn’t print at the end of the article, though.
-
WSRuthieS
AskWoody LoungerInteresting update on this problem: It hasn’t happened since last fall that I know of, but a student had about 4 of the 15 or so articles she printed tonight print out with blank pages and pages only half printed. Ironically, it was the first page of the article that usually printed blank. Thankfully, the Print to Image option still fixed it. It’s such a bizarre thing! (And doesn’t make the students–who pay for printing–very happy!)
-
WSRuthieS
AskWoody LoungerOh, and I think I tried to figure out a custom format for mm/yyyy in Access and couldn’t get it to work anyway. But, that was last year sometime, and being a Mommy has run away with my brain since then!
-
WSRuthieS
AskWoody LoungerSometimes a summary for the year is all the data I have–sometimes it’s broken out by month. So, I’m just throwing it all in the same place and then I can run whatever reports I want on the data. Nothing in the table will be looked at without going through a query first, so it’s easier for me to just throw it all into one place. That way I can search for all the summary data for 2006, or all the data for Jan 2006, or whatever else I want to do.
-
WSRuthieS
AskWoody LoungerYeah, it should leave the entries alone, but I would have sworn it wasn’t doing so. However, when I just tested it, it worked fine. Go figure. But, if it starts doing it again, I think putting the apostrophe there will be a quick solution. I had forgotten I could do that. Thanks!
(The problem with importing the column as date/time values into Access is that then Access changes them to mm/dd/yyyy instead of mm/yyyy. And, I can’t use a custom format because I have some rows that contain summary data for the year as just yyyy.)
-
WSRuthieS
AskWoody LoungerThanks for the suggestion. The problem with that solution, is that if I do that when I import the spreadsheet into Access, it changes the format to Date/Time, and mm/dd/yyyy, so then the data is screwed up again. My Excel solution so far has been to enter a date into the column, and then change the column format to text, which it will then respect. If I change it to text first, then it still auto-corrects the field. So, it’s annoying to have to enter a date twice, but it’s doable if there’s no other choice.
![]() |
Patch reliability is unclear, but widespread attacks make patching prudent. Go ahead and patch, but watch out for potential problems. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
Win 7 MS Essentials suddenly not showing number of items scanned.
by
Oldtimer
54 minutes ago -
France : A law requiring messaging apps to implement a backdoor ..
by
Alex5723
5 hours, 45 minutes ago -
Dev runs Windows 11 ARM on an iPad Air M2
by
Alex5723
6 hours, 34 minutes ago -
MS-DEFCON 3: Cleanup time
by
Susan Bradley
1 hour, 35 minutes ago -
KB5056686 (.NET v8.0.15) Delivered Twice in April 2025
by
lmacri
1 hour, 59 minutes ago -
How to enable Extended Security Maintenance on Ubuntu 20.04 LTS before it dies
by
Alex5723
17 hours, 48 minutes ago -
Windows 11 Insider Preview build 26200.5562 released to DEV
by
joep517
21 hours, 46 minutes ago -
Windows 11 Insider Preview build 26120.3872 (24H2) released to BETA
by
joep517
21 hours, 47 minutes ago -
Unable to eject external hard drives
by
Robertos42
1 hour, 14 minutes ago -
Saying goodbye to not-so-great technology
by
Susan Bradley
5 hours, 39 minutes ago -
Tech I don’t miss, and some I do
by
Will Fastie
2 hours, 51 minutes ago -
Synology limits hard drives
by
Susan Bradley
2 days, 1 hour ago -
Links from Microsoft 365 and from WhatsApp not working
by
rog7
1 day, 4 hours ago -
WhatsApp Security Advisories CVE-2025-30401
by
Alex5723
2 days, 8 hours ago -
Upgrade Sequence
by
doneager
2 days, 1 hour ago -
Chrome extensions with 6 million installs have hidden tracking code
by
Nibbled To Death By Ducks
6 hours, 59 minutes ago -
Uninstall “New Outlook” before installing 2024 Home & Business?
by
Tex265
1 day ago -
The incredible shrinking desktop icons
by
Thumper
3 days, 5 hours ago -
Windows 11 Insider Preview Build 22635.520 (23H2) released to BETA
by
joep517
3 days, 6 hours ago -
Connecting hard drive on USB 3.2 freezes File Explorer & Disk Management
by
WSJMGatehouse
5 hours, 44 minutes ago -
Shellbag Analyser & Cleaner Update
by
Microfix
1 day, 15 hours ago -
CISA warns of increased breach risks following Oracle Cloud leak
by
Nibbled To Death By Ducks
3 days, 15 hours ago -
Outlook 2024 two sent from email addresses
by
Kathy Stevens
2 days, 20 hours ago -
Speeding up 11’s search
by
Susan Bradley
1 day, 4 hours ago -
HP Pavilion Will Not Wake Up After Being Idle for Longer Period
by
WSwalterwood44
1 day, 16 hours ago -
Make a Windows 11 Local Account Passwordless
by
Drcard:))
4 days, 5 hours ago -
Ubuntu 25.04 (Plucky Puffin)
by
Alex5723
4 days, 13 hours ago -
24H2 fixed??
by
CWBillow
3 days, 5 hours ago -
Uninstalr Updates
by
jv16
4 days, 18 hours ago -
Apple zero days for April
by
Susan Bradley
15 hours, 18 minutes ago
Recent blog posts
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.