-
WSAbraxus
AskWoody LoungerI am trying to open an Excel application, then a workbook, then get data from the workbook, then close the workbook and then close Excel.
When my code is done running, Excel still shows in my task list.
Any ideas what is going on?
Morgan
Sub ImportNewReport() 'Used to import the daily report Dim strFileToImport As String strFileToImport = "C:Documents and Settingsmerick01.AD" & _ "DesktopPLP ProjectsToImport1121Daily PLP Team Projects.xls" 'Open the excel report for importing Dim objXL As Excel.Application Set objXL = New Excel.Application With objXL .Visible = False .Workbooks.Open strFileToImport .Range("A2").Select Dim dteFileDate As Date dteFileDate = ActiveCell.Formula MsgBox dteFileDate .Workbooks.Close .Application.Quit .Application.Quit End With Set objXL = Nothing End Sub
Edited by HansV to break extremely long line that caused scrolling.
-
WSAbraxus
AskWoody LoungerCool!!
Thanks a ton. My brain isn’t working this morning.
-
WSAbraxus
AskWoody LoungerCool!!
Thanks a ton. My brain isn’t working this morning.
-
WSAbraxus
AskWoody LoungerIt will be stored as a string.
-
WSAbraxus
AskWoody LoungerThanks!
I’ll have her give it a try.
-
WSAbraxus
AskWoody LoungerThank you for the reply.
I was afraid of something like that. I am going to try putting a letter at the end of the credit card number, 4579637981576789X, for example, and see if when they paste it, the X is allowed or not. It is my hope that the billing system is trapping for only 16 digits and lets the CC number in but not the X.
Thanks again!
-
WSAbraxus
AskWoody LoungerI ended up writing a work-around:
Sub ImportTest() 'Open the file to import Dim intFileNum As Integer intFileNum = FreeFile Open "Myfile.txt" For Input As #intFileNum Dim strFromFile As String While Not EOF(intFileNum) Line Input #intFileNum, strFromFile Dim intLength For intLength = 1 To Len(strFromFile) Dim strIndividualRecord As String If Asc(Mid(strFromFile, intLength, 1)) = 10 Or _ Asc(Mid(strFromFile, intLength, 1)) = 13 Then 'End of the record If Len(strIndividualRecord) > 0 Then Debug.Print "-----------" Debug.Print strIndividualRecord End If strIndividualRecord = "" Else strIndividualRecord = strIndividualRecord + Mid(strFromFile, intLength, 1) End If Next intLength Wend Close #intFileNum MsgBox "Done!" End Sub
Thanks for all the suggestions!
-
WSAbraxus
AskWoody LoungerWorked like a charm!
Thank you.
-
WSAbraxus
AskWoody LoungerFebruary 7, 2003 at 12:35 pm in reply to: Run a macron in a workbook that is NOT open (Excel 97/2002) #651533I know how to load the workbook with the macro in it, but I don’t want the sheets in that WB to be seen.
I just want it in the background.
-
WSAbraxus
AskWoody LoungerJanuary 8, 2003 at 6:44 pm in reply to: I don’t like the confirmation dialog…Can I kill (Excel 2002) #643541Man…
For the first time ever I think I used the object browser and saw Application.Dialogs but somehow missed .DisplayAlerts
Thanks for the assistance!!
-
WSAbraxus
AskWoody LoungerGreat thanks!!
That code worked like a champ.
I appreciate the help!
-
WSAbraxus
AskWoody LoungerThat is the ABSOLUTE WEIRDEST thing I have EVER seen in my life…
Oddly enough, it worked.
I appreciate the help. File that one under Odd Things You Might Try…
Thanks a TON!!
-
WSAbraxus
AskWoody LoungerAbsolutely. That’s the first thing I checked.
In addition, I changed her installation of Access to include all options, in case something was missed in the initial install. (This has worked for me with other issues in the past)
This one REALLY has me stumped. It’s tough to tell her “It works for me just fine…” when it won’t for her.
It’s not just her PC, either. It’s everyone in her group that is using it. They all have similar PC configurations.
Could there be a problem with the Corporate image of Win2K that is causing it? How about Excel 97 being in the mix with some Office XP?
Sign me Extremely Frustrated,
-
WSAbraxus
AskWoody LoungerI understand. This is not my PC, and the individual it is for is not the most technically savvy…
I use a query to output some data to Excel via DoCmd.OutputTo acTable, “qryMyQuery”, “MicrosoftExcel(*.xls)”, “c:Test.xls”, False, “”
The query uses the CInt, Left, and Len functions. Here is the exact message:
Function isn’t available in expressions in query expression ‘Cint(Left([Code],Len([Code])-1))’.This query worked before the user got upgraded to Win2K. The also got Office XP with the following exceptions:
Kept Access 97
Kept Excel 97Any pointers are greatly appreciated!
-
WSAbraxus
AskWoody LoungerIt’s not on my PC so I can’t give the exact error number & desc, but it something like “Function not available in query…”
Any query along the lines of:
SELECT UCase([FirstName]) FROM MyTableis failing…
![]() |
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
-
Word crashes when accessing Help
by
CWBillow
1 hour, 49 minutes ago -
New Microsoft Nag — Danger! Danger! sign-in to your Microsoft Account
by
EricB
5 hours, 35 minutes ago -
Blank Inetpub folder
by
Susan Bradley
6 hours, 27 minutes ago -
Google : Extended Repair Program for Pixel 7a
by
Alex5723
8 hours, 19 minutes ago -
Updates seem to have broken Microsoft Edge
by
rebop2020
12 hours, 3 minutes ago -
Wait command?
by
CWBillow
1 hour, 35 minutes ago -
Malwarebytes 5 Free version manual platform updates
by
Bob99
14 hours, 57 minutes ago -
inetpub : Microsoft’s patch for CVE-2025–21204 introduces vulnerability
by
Alex5723
21 hours, 33 minutes ago -
Windows 10 finally gets fix
by
Susan Bradley
1 day, 6 hours ago -
AMD Ryzen™ Chipset Driver Release Notes 7.04.09.545
by
Alex5723
1 day, 7 hours ago -
Win 7 MS Essentials suddenly not showing number of items scanned.
by
Oldtimer
1 day, 2 hours ago -
France : A law requiring messaging apps to implement a backdoor ..
by
Alex5723
1 day, 20 hours ago -
Dev runs Windows 11 ARM on an iPad Air M2
by
Alex5723
1 day, 21 hours ago -
MS-DEFCON 3: Cleanup time
by
Susan Bradley
16 hours, 40 minutes ago -
KB5056686 (.NET v8.0.15) Delivered Twice in April 2025
by
lmacri
2 hours, 57 minutes ago -
How to enable Extended Security Maintenance on Ubuntu 20.04 LTS before it dies
by
Alex5723
2 days, 8 hours ago -
Windows 11 Insider Preview build 26200.5562 released to DEV
by
joep517
2 days, 12 hours ago -
Windows 11 Insider Preview build 26120.3872 (24H2) released to BETA
by
joep517
2 days, 12 hours ago -
Unable to eject external hard drives
by
Robertos42
23 hours, 24 minutes ago -
Saying goodbye to not-so-great technology
by
Susan Bradley
11 hours, 5 minutes ago -
Tech I don’t miss, and some I do
by
Will Fastie
8 hours, 59 minutes ago -
Synology limits hard drives
by
Susan Bradley
3 days, 17 hours ago -
Links from Microsoft 365 and from WhatsApp not working
by
rog7
2 days, 19 hours ago -
WhatsApp Security Advisories CVE-2025-30401
by
Alex5723
3 days, 23 hours ago -
Upgrade Sequence
by
doneager
3 days, 16 hours ago -
Chrome extensions with 6 million installs have hidden tracking code
by
Nibbled To Death By Ducks
1 day, 22 hours ago -
Uninstall “New Outlook” before installing 2024 Home & Business?
by
Tex265
2 days, 15 hours ago -
The incredible shrinking desktop icons
by
Thumper
4 days, 20 hours ago -
Windows 11 Insider Preview Build 22635.5240 (23H2) released to BETA
by
joep517
4 days, 21 hours ago -
Connecting hard drive on USB 3.2 freezes File Explorer & Disk Management
by
WSJMGatehouse
1 day, 20 hours 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.