-
WSready4data
AskWoody LoungerHans,
Thanks. That worked but I should have specified that I want that to happen for any value in A4 to A100
Can the code be modified for that range.
Thanks -
WSready4data
AskWoody LoungerCharlotte,
It was a typo. It is 3.6. I’ll try declaring them as you and Hans indicate.
Thanks -
WSready4data
AskWoody LoungerThanks again, I’ll give it a try and see what it can do.
-
WSready4data
AskWoody LoungerThanks again, I’ll give it a try and see what it can do.
-
WSready4data
AskWoody LoungerFrancios,
Thanks.
SendKeys worked. If I have time I will try the api function.Any ideas on removing orphaned code left behind after removing bcommand buttons.
-
WSready4data
AskWoody LoungerFrancios,
Thanks.
SendKeys worked. If I have time I will try the api function.Any ideas on removing orphaned code left behind after removing bcommand buttons.
-
WSready4data
AskWoody LoungerHans,
Thanks. That did it. -
WSready4data
AskWoody LoungerHans,
Thanks. That did it. -
WSready4data
AskWoody LoungerHans,
I used the previous range you gave me and it works.
One more question and I’ll stop bugging you……today
How do I put all borders around that range. I tried creating a macro to see if that code would work but it didn’t like the .borders line.
.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomaticThanks,
Scott -
WSready4data
AskWoody LoungerHans,
I used the previous range you gave me and it works.
One more question and I’ll stop bugging you……today
How do I put all borders around that range. I tried creating a macro to see if that code would work but it didn’t like the .borders line.
.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomaticThanks,
Scott -
WSready4data
AskWoody LoungerHuge screenshot reduced in size by HansV – please don’t exceed 640 x 480.
Hans,
I probably didn’t explain what I wanted to do correctly so I attached a picture of what I’m trying to do.
Your .Range suggestion just select a row or a column. I wanted to select the whole grid area from Cell E2 to the
last cell on the bottom right.
Thanks,
Scott -
WSready4data
AskWoody LoungerHuge screenshot reduced in size by HansV – please don’t exceed 640 x 480.
Hans,
I probably didn’t explain what I wanted to do correctly so I attached a picture of what I’m trying to do.
Your .Range suggestion just select a row or a column. I wanted to select the whole grid area from Cell E2 to the
last cell on the bottom right.
Thanks,
Scott -
WSready4data
AskWoody LoungerHans,
Thanks that did it. It also fixed the problem of Excel releasing from memory.
One other thing
How would I find the last cell used in a range in this statement.
.Range(.Cells(2, 5), .Cells(last cell used)) like hitting Ctrl+EndThanks as always,
Scott -
WSready4data
AskWoody LoungerHans,
Thanks that did it. It also fixed the problem of Excel releasing from memory.
One other thing
How would I find the last cell used in a range in this statement.
.Range(.Cells(2, 5), .Cells(last cell used)) like hitting Ctrl+EndThanks as always,
Scott -
WSready4data
AskWoody LoungerI have some code I use in Access after I export a query to an Excel file.
It does some formatting and only works once. If I try to do the process again it hangs
at the .Range statement.
I tried two different types of statements but the same thing happens.
Excel doesn’t seem to close out of memory after the code runs. Even stopping it from Ctl-Alt-Del and trying again.
The only time it seems to work again is the third time.
I’m not too good in Excel syntax so I’m sure I’m doing something wrong.Scott
…Code that does the export happens here first……
Dim xlApp As Excel.Application Dim xlWbk As Excel.Workbook Dim xlSht As Excel.Worksheet Set xlApp = CreateObject("excel.Application") Set xlWbk = xlApp.Workbooks.Open(strFILE) Set xlSht = xlWbk.Worksheets(1) xlApp.Visible = False With xlSht.Cells.Font .NAME = "Arial" .Size = 10 End With With xlSht .Rows("1:1").RowHeight = 165 '.Range("E1:AZ1").Select .Range(Cells(1, 5), Cells(1, intCount + 4)).Select 'intCount is a count of the number of columns used. With Selection .HorizontalAlignment = xlGeneral .VerticalAlignment = xlBottom .WrapText = True .Orientation = 90 .AddIndent = False .IndentLevel = 0 .ShrinkToFit = False .ReadingOrder = xlContext .MergeCells = False End With Selection.Columns.AutoFit Columns("A:D").Select Selection.Columns.AutoFit Range("A1").Select End With xlWbk.Close SaveChanges:=True xlApp.Quit Set xlSht = Nothing Set xlWbk = Nothing Set xlApp = Nothing
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
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
-
Windows 11 Insider Preview build 26200.5600 released to DEV
by
joep517
59 minutes ago -
Windows 11 Insider Preview build 26120.3964 (24H2) released to BETA
by
joep517
1 hour ago -
Drivers suggested via Windows Update
by
Tex265
51 minutes ago -
Thunderbird release notes for 128 esr have disappeared
by
EricB
4 hours, 41 minutes ago -
CISA mutes own website, shifts routine cyber alerts to X, RSS, email
by
Nibbled To Death By Ducks
7 hours, 51 minutes ago -
Apple releases 18.5
by
Susan Bradley
2 hours, 16 minutes ago -
Fedora Linux 40 will go end of life for updates and support on 2025-05-13.
by
Alex5723
9 hours, 17 minutes ago -
How a new type of AI is helping police skirt facial recognition bans
by
Alex5723
9 hours, 54 minutes ago -
Windows 7 ISO /Windows 10 ISO
by
ECWS
16 hours, 51 minutes ago -
No HP software folders
by
fpefpe
17 hours, 36 minutes ago -
Which antivirus apps and VPNs are the most secure in 2025?
by
B. Livingston
1 hour, 33 minutes ago -
Stay connected anywhere
by
Peter Deegan
22 hours, 58 minutes ago -
Copilot, under the table
by
Will Fastie
14 hours, 12 minutes ago -
The Windows experience
by
Will Fastie
1 day, 5 hours ago -
A tale of two operating systems
by
Susan Bradley
20 hours, 9 minutes ago -
Microsoft : Resolving Blue Screen errors in Windows
by
Alex5723
1 day, 10 hours ago -
Where’s the cache today?
by
Up2you2
2 days, 1 hour ago -
Ascension says recent data breach affects over 430,000 patients
by
Nibbled To Death By Ducks
1 day, 18 hours ago -
Nintendo Switch 2 has a remote killing switch
by
Alex5723
18 hours, 58 minutes ago -
Blocking Search (on task bar) from going to web
by
HenryW
1 hour, 16 minutes ago -
Windows 10: Microsoft 365 Apps will be supported up to Oct. 10 2028
by
Alex5723
2 days, 19 hours ago -
Add or Remove “Ask Copilot” Context Menu in Windows 11 and 10
by
Alex5723
2 days, 19 hours ago -
regarding april update and may update
by
heybengbeng
2 days, 20 hours ago -
MS Passkey
by
pmruzicka
1 day, 22 hours ago -
Can’t make Opera my default browser
by
bmeacham
3 days, 4 hours ago -
*Some settings are managed by your organization
by
rlowe44
2 days, 15 hours ago -
Formatting of “Forward”ed e-mails
by
Scott Mills
3 days, 3 hours ago -
SmartSwitch PC Updates will only be supported through the MS Store Going Forward
by
PL1
3 days, 22 hours ago -
CISA warns of hackers targeting critical oil infrastructure
by
Nibbled To Death By Ducks
4 days, 8 hours ago -
AI slop
by
Susan Bradley
2 days, 1 hour 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.