-
WSmrabrams
AskWoody LoungerJust my 2 cents:
Every once in awhile, this happens to me. No rhyme, no reason.
When it happens, I go to:
Tools/Options/Calculation tab.Somehow, the “Manual” radio button is checked.
All I do is change it to Automatic, and life is back to normal.
Don’t know why it happens, but that’s how I fix it. Stuff like that drives me crazy !!
Michael
-
WSmrabrams
AskWoody LoungerThank you so much Deborah – it works perfectly now !! Much appreciated.
Michael
-
WSmrabrams
AskWoody LoungerOops, I’m sorry, I should have seen that. Since you separate the names with semi-colons, you should change the line
ARR = Split(Recip, “,”)
to
ARR = Split(Recip, “;”)
That did it !! Hans, thank you so much for sharing your knowledge and being so patient.
Very sincerely,
Michael Abrams -
WSmrabrams
AskWoody LoungerI am so sorry for being a PITA, but using the below code does put both names into the TO line of the email but when Outlook opens and I click send, the same message appears:
Microsoft Office Outlook does not recognize FranklJ@mycompany.org;LortonC@mycompany.orgThis looks like it may be turning into an Outlook inquiry. Any clues to why Outlook isn’t recognizing the
two recipients as spelled out above?Command button code:
Private Sub cmdSend_Click()
On Error GoTo Err_cmdSend_ClickSendMessage (“FranklJ@mycompany.org;LortonC@mycompany.org”)
Exit_cmdSend_Click:
Exit SubErr_cmdSend_Click:
MsgBox Err.Description
Resume Exit_cmdSend_ClickFunction:
Private Sub SendMessage(Recip As String)On Error GoTo Err_SendMessage_Click
Dim NameSpace As Object
Dim EmailSend As Object
Dim EmailApp As ObjectDim MYSTRING As String
Dim ARR
Dim Counter As Integer
Dim objRecip As ObjectDim mySubject As String
Dim myBody As String
Dim mYRecipient As StringMYSTRING = “YOU MUST FILL IN ALL REQUIRED FIELDS. REQUESTER/SOURCE/HMO/IPA/GROUP# & PLAN”
If IsNull(cboRequester) Or IsNull(Combo779) Or IsNull([txtgroup#]) Or IsNull([cboSource]) Or IsNull(txtPlan) Then
MsgBox MYSTRING, vbExclamation, “DATA ENTRY ERROR”
Exit Sub
End IfmySubject = “ITCFM ” & “URGENT!!!!! ” & [HMO] & “/” & [IPA] & “/” & [Group Name] & “/” & [Group#]
myBody = “HMO: ” & [HMO] & Chr(10) & “IPA: ” & [IPA] & Chr(10) & “Group Name: ” & [Group Name] & Chr(10) & “Group#: ” & [Group#] & _
Chr(10) & “Plan Name: ” & [Plan] & Chr(10) & “Eff Date: ” & [EffDate] & Chr(10) & “IDX Plan#: ” & [IDX Plan#] & Chr(10) & “Contract Code/PPID: ” & _
[Contract Code (CC)] & Chr(10) & “Branch Code(Cigna):” & [txtBranchCode] & Chr(10) & “Benefit Option Code(Cigna):” & [txtBenefitOptionCode] & Chr(10) & _
“Unit #(Maxicare):” & [txtUnitNum] & Chr(10) & “Plan Description:” & [Plan Description] & Chr(10) & “OV CoPay: ” & [txtOVCoPay] & _
Chr(10) & Chr(10) & “COMMENTS:” & Chr(10) & _
[Notes_Comments] & Chr(10) & Chr(10) & Chr(10) & [Requester] ‘Add a comma and a zero here to send automatically
mYRecipient = RecipSet EmailApp = CreateObject(“Outlook.Application”) ‘outlook object
Set NameSpace = EmailApp.GetNamespace(“MAPI”)
Set EmailSend = EmailApp.CreateItem(0) ‘CreateItem(0)Mail ItemEmailSend.Subject = mySubject ‘subject
EmailSend.Body = myBody ‘body
‘EmailSend.Recipients.Add (mYRecipient) ‘first add the email or user as a recipient
‘EmailSend.Importance = olImportanceHigh
EmailSend.Display ‘ Remove if you don’t want to view email before being sent.With EmailSend
ARR = Split(Recip, “,”)
For Counter = 0 To UBound(ARR)
Set objRecip = EmailSend.Recipients.Add(ARR(Counter))Next Counter
End With
[txtSentToIT] = Format(Date, “MM/DD/YYYY”)
Exit_SendMessage_Click:
Exit SubErr_SendMessage_Click:
MsgBox Err.Description
Resume Exit_SendMessage_ClickEnd Sub
-
WSmrabrams
AskWoody LoungerYou should obviously remove the line
EmailSend.Recipients.Add (mYRecipient) ‘first add the email or user as a recipient
Obviously !!
Hans – once again you pulled through for me – it works like a charm now.
Much, much appreciated !!
Have a nice week !
Michael Abrams
-
WSmrabrams
AskWoody LoungerOK I am getting closer.
I moved the code:
Now when the email pops up, it has both names TWICE.
Private Sub SendMessage(Recip As String)
On Error GoTo Err_SendMessage_Click
Dim NameSpace As Object
Dim EmailSend As Object
Dim EmailApp As ObjectDim MYSTRING As String
Dim ARR
Dim Counter As Integer
Dim objRecip As ObjectDim mySubject As String
Dim myBody As String
Dim mYRecipient As StringMYSTRING = “YOU MUST FILL IN ALL REQUIRED FIELDS. REQUESTER/SOURCE/HMO/IPA/GROUP# & PLAN”
If IsNull(cboRequester) Or IsNull(Combo779) Or IsNull([txtgroup#]) Or IsNull([cboSource]) Or IsNull(txtPlan) Then
MsgBox MYSTRING, vbExclamation, “DATA ENTRY ERROR”
Exit Sub
End IfmySubject = “ITCFM ” & “URGENT!!!!! ” & [HMO] & “/” & [IPA] & “/” & [Group Name] & “/” & [Group#]
myBody = “HMO: ” & [HMO] & Chr(10) & “IPA: ” & [IPA] & Chr(10) & “Group Name: ” & [Group Name] & Chr(10) & “Group#: ” & [Group#] & _
Chr(10) & “Plan Name: ” & [Plan] & Chr(10) & “Eff Date: ” & [EffDate] & Chr(10) & “IDX Plan#: ” & [IDX Plan#] & Chr(10) & “Contract Code/PPID: ” & _
[Contract Code (CC)] & Chr(10) & “Branch Code(Cigna):” & [txtBranchCode] & Chr(10) & “Benefit Option Code(Cigna):” & [txtBenefitOptionCode] & Chr(10) & _
“Unit #(Maxicare):” & [txtUnitNum] & Chr(10) & “Plan Description:” & [Plan Description] & Chr(10) & “OV CoPay: ” & [txtOVCoPay] & _
Chr(10) & Chr(10) & “COMMENTS:” & Chr(10) & _
[Notes_Comments] & Chr(10) & Chr(10) & Chr(10) & [Requester] ‘Add a comma and a zero here to send automatically
mYRecipient = RecipSet EmailApp = CreateObject(“Outlook.Application”) ‘outlook object
Set NameSpace = EmailApp.GetNamespace(“MAPI”)
Set EmailSend = EmailApp.CreateItem(0) ‘CreateItem(0)Mail ItemEmailSend.Subject = mySubject ‘subject
EmailSend.Body = myBody ‘body
EmailSend.Recipients.Add (mYRecipient) ‘first add the email or user as a recipient
‘EmailSend.Importance = olImportanceHigh
EmailSend.Display ‘ Remove if you don’t want to view email before being sent.With EmailSend
ARR = Split(Recip, “,”)
For Counter = 0 To UBound(ARR)
Set objRecip = EmailSend.Recipients.Add(ARR(Counter))Next Counter
End With[txtSentToIT] = Format(Date, “MM/DD/YYYY”)
Exit_SendMessage_Click:
Exit SubErr_SendMessage_Click:
MsgBox Err.Description
Resume Exit_SendMessage_ClickEnd Sub
-
WSmrabrams
AskWoody LoungerThere’s some confusion here because you and I use the variable Recip for different purposes. Change the line
Set Recip= EmailSend.mYRecipient.Add(arr(Counter))
to
Set objRecip= EmailSend.Recipients.Add(arr(Counter))
You may want to declare objRecip near the beginning of SendMessage:
Dim objRecip As Object
It compiled fine, but when I hit the command button I get the message:
Object variable or With block variable not set
Thanks for your patience
MichaelPrivate Sub cmdSend_Click()
On Error GoTo Err_cmdSend_ClickSendMessage (“FranklJ@sutterhealth.org;abramsm@sutterhealth.org”)
Exit_cmdSend_Click:
Exit SubErr_cmdSend_Click:
MsgBox Err.Description
Resume Exit_cmdSend_ClickEnd Sub
Private Sub SendMessage(Recip As String)On Error GoTo Err_SendMessage_Click
Dim NameSpace As Object
Dim EmailSend As Object
Dim EmailApp As ObjectDim MYSTRING As String
Dim ARR
Dim Counter As Integer
Dim objRecip As ObjectDim mySubject As String
Dim myBody As String
Dim mYRecipient As StringMYSTRING = “YOU MUST FILL IN ALL REQUIRED FIELDS. REQUESTER/SOURCE/HMO/IPA/GROUP# & PLAN”
With EmailSend
ARR = Split(Recip, “,”)
For Counter = 0 To UBound(ARR)
Set objRecip = EmailSend.Recipients.Add(ARR(Counter))Next Counter
End With
If IsNull(cboRequester) Or IsNull(Combo779) Or IsNull([txtgroup#]) Or IsNull([cboSource]) Or IsNull(txtPlan) Then
MsgBox MYSTRING, vbExclamation, “DATA ENTRY ERROR”
Exit Sub
End IfmySubject = “ITCFM ” & “URGENT!!!!! ” & [HMO] & “/” & [IPA] & “/” & [Group Name] & “/” & [Group#]
myBody = “HMO: ” & [HMO] & Chr(10) & “IPA: ” & [IPA] & Chr(10) & “Group Name: ” & [Group Name] & Chr(10) & “Group#: ” & [Group#] & _
Chr(10) & “Plan Name: ” & [Plan] & Chr(10) & “Eff Date: ” & [EffDate] & Chr(10) & “IDX Plan#: ” & [IDX Plan#] & Chr(10) & “Contract Code/PPID: ” & _
[Contract Code (CC)] & Chr(10) & “Branch Code(Cigna):” & [txtBranchCode] & Chr(10) & “Benefit Option Code(Cigna):” & [txtBenefitOptionCode] & Chr(10) & _
“Unit #(Maxicare):” & [txtUnitNum] & Chr(10) & “Plan Description:” & [Plan Description] & Chr(10) & “OV CoPay: ” & [txtOVCoPay] & _
Chr(10) & Chr(10) & “COMMENTS:” & Chr(10) & _
[Notes_Comments] & Chr(10) & Chr(10) & Chr(10) & [Requester] ‘Add a comma and a zero here to send automatically
mYRecipient = RecipSet EmailApp = CreateObject(“Outlook.Application”) ‘outlook object
Set NameSpace = EmailApp.GetNamespace(“MAPI”)
Set EmailSend = EmailApp.CreateItem(0) ‘CreateItem(0)Mail ItemEmailSend.Subject = mySubject ‘subject
EmailSend.Body = myBody ‘body
EmailSend.Recipients.Add (mYRecipient) ‘first add the email or user as a recipient
‘EmailSend.Importance = olImportanceHigh
EmailSend.Display ‘ Remove if you don’t want to view email before being sent.[txtSentToIT] = Format(Date, “MM/DD/YYYY”)
Exit_SendMessage_Click:
Exit SubErr_SendMessage_Click:
MsgBox Err.Description
Resume Exit_SendMessage_ClickEnd Sub
Private Sub Command4_Click()
Do While Not IsNull([Record#])
[TAT] = Work_Days(txtSentToIT, txtDateCompleted)
DoCmd.GoToRecord , , acNextLoop
End Sub
-
WSmrabrams
AskWoody LoungerYou’ll have to modify it to fit in with the your own code, of course.
Of course
It is getting stuck asking for “Object required” on highlighted”
Private Sub SendMessage(Recip As String)
On Error GoTo Err_SendMessage_Click
Dim NameSpace As Object
Dim EmailSend As Object
Dim EmailApp As ObjectDim MYSTRING As String
Dim arr
Dim Counter As IntegerDim mySubject As String
Dim myBody As String
Dim mYRecipient As StringMYSTRING = “YOU MUST FILL IN ALL REQUIRED FIELDS. REQUESTER/SOURCE/HMO/IPA/GROUP# & PLAN”
If IsNull(cboRequester) Or IsNull(Combo779) Or IsNull([txtgroup#]) Or IsNull([cboSource]) Or IsNull(txtPlan) Then
MsgBox MYSTRING, vbExclamation, “DATA ENTRY ERROR”
Exit Sub
End IfmySubject = “ITCFM ” & “URGENT!!!!! ” & [HMO] & “/” & [IPA] & “/” & [Group Name] & “/” & [Group#]
myBody = “HMO: ” & [HMO] & Chr(10) & “IPA: ” & [IPA] & Chr(10) & “Group Name: ” & [Group Name] & Chr(10) & “Group#: ” & [Group#] & _
Chr(10) & “Plan Name: ” & [Plan] & Chr(10) & “Eff Date: ” & [EffDate] & Chr(10) & “IDX Plan#: ” & [IDX Plan#] & Chr(10) & “Contract Code/PPID: ” & _
[Contract Code (CC)] & Chr(10) & “Branch Code(Cigna):” & [txtBranchCode] & Chr(10) & “Benefit Option Code(Cigna):” & [txtBenefitOptionCode] & Chr(10) & _
“Unit #(Maxicare):” & [txtUnitNum] & Chr(10) & “Plan Description:” & [Plan Description] & Chr(10) & “OV CoPay: ” & [txtOVCoPay] & _
Chr(10) & Chr(10) & “COMMENTS:” & Chr(10) & _
[Notes_Comments] & Chr(10) & Chr(10) & Chr(10) & [Requester] ‘Add a comma and a zero here to send automatically
mYRecipient = RecipSet EmailApp = CreateObject(“Outlook.Application”) ‘outlook object
Set NameSpace = EmailApp.GetNamespace(“MAPI”)
Set EmailSend = EmailApp.CreateItem(0) ‘CreateItem(0)Mail ItemWith EmailSend
arr = Split(Recip, “,”)
For Counter = 0 To UBound(arr)
Set Recip= EmailSend.mYRecipient.Add(arr(Counter))
Next Counter[/color]EmailSend.Subject = mySubject ‘subject
EmailSend.Body = myBody ‘body
EmailSend.recipients.Add (mYRecipient) ‘first add the email or user as a recipient
‘EmailSend.Importance = olImportanceHigh
EmailSend.Display ‘ Remove if you don’t want to view email before being sent.[txtSentToIT] = Format(Date, “MM/DD/YYYY”)
Exit_SendMessage_Click:
Exit SubErr_SendMessage_Click:
MsgBox Err.Description
Resume Exit_SendMessage_ClickEnd Sub
-
WSmrabrams
AskWoody LoungerYou have to use the Split function to create an array of recipient names, and add them one by one. The code of the SendMail function shows how to do that:
Code:Function SendMail( _ Recipient As String, _ ... ... With objMI arr = Split(Recipient, ";") For Counter = 0 To UBound(arr) Set Recip = objMI.Recipients.Add(arr(Counter)) Next Counter ...
Here, objMI is the equivalent of EmailSend in your code.
I will add this to the SendMessage code and see what happens.
Thank you for your help Hans.
Michael
-
WSmrabrams
AskWoody LoungerThe SendMail function in the attachment to [post=”728849″]Post 728849[/post] shows how to handle multiple recipients in a string, separated by semi-colons.
Using the example:
SendMail “john@this.com;mary@that.org”I have tried
SendMessage (“FranklJ@mycompany.org;LortonC@mycompany.org”)and Outlook states “Microsoft Office Outlook does not recognize FranklJ@mycompany.org;LortonC@mycompany.org
-
WSmrabrams
AskWoody LoungerFirst of all, I would like to thank Hans for your patience and pieterse for the tutorial.
You guys are awesome and I really appreciate the time you take to share your knowledge (and patience)
Very Sincerely,
Michael Abrams -
WSmrabrams
AskWoody LoungerIf a toolbar is docked at the top of the Excel window, like the Standard and Formatting toolbars are by default, its title (caption) isn’t displayed, only the buttons. When you undock it (use the “handle” on the left hand side to drag it away from the top), the title bar will appear again. This is “normal” behavior for toolbars.
Wow !
On my previous computer it sat right on the top menu bar and said Reports with a dropdown of the macros.
It works fine now that I know this.
Thank you Hans !
Michael
-
WSmrabrams
AskWoody LoungerMake sure that you drop the macro squarely on the toolbar and not beside it (the latter is easy to do if you want to add the button at the end, it has happened to me several times)
This is so frustrating.
When the toolbar is created, it appears ‘on’ the spreadsheet. I placed the button squarely on the toolbar.
The title Reports still apears, and the button is ‘in’ the toolbar.
When I drag the new toolbar up to the Standard toolbar, the button replaces the word Reports.I will keep trying though !!
Thank you Hans.
-
WSmrabrams
AskWoody LoungerI created the custom toolbar (Reports)
When I drag a custom button from Commands/Macros to the new toolbar, the title Reports goes away, and the macro IS the toolbar. There is no ‘dropdown’. I hope I am describing this clearly).
I cannot imagine what I am doing wrong. Can you assist?
-
WSmrabrams
AskWoody LoungerYou could try opening the .xlb file and see if that works. If not, you’ll probably have to reassign the macros to the toolbar buttons one by one.
Looks like it’s going to be 1 by 1. So sad……….
Thanks Hans !
Michael
![]() |
There are isolated problems with current patches, but they are well-known and documented on this site. |
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
-
MS-DEFCON 2: Do you need that update?
by
Susan Bradley
13 minutes ago -
What Terminal Is Southwest at Austin Airport? Find Complete AUS Terminal Info (Awaiting moderation)
by
airlinesterminaloffice1
47 minutes ago -
What Terminal Is Southwest at Austin Airport? Find Complete AUS Terminal Info (Awaiting moderation)
by
airlinesterminaloffice1
51 minutes ago -
CD/DVD drive is no longer recognized
by
WSCape Sand
11 hours, 10 minutes ago -
Windows 11 24H2 Default Apps stuck on Edge and Adobe Photoshop
by
MikeBravo
13 hours, 59 minutes ago -
North Face and Cartier customer data stolen in cyber attacks
by
Alex5723
12 hours, 5 minutes ago -
What is wrong with simple approach?
by
WSSpoke36
4 hours, 37 minutes ago -
Microsoft-Backed Builder.ai Set for Bankruptcy After Cash Seized
by
Alex5723
23 hours, 29 minutes ago -
Location, location, location
by
Susan Bradley
1 hour, 10 minutes ago -
Cannot get a task to run a restore point
by
CWBillow
1 day ago -
Frustrating search behavior with Outlook
by
MrJimPhelps
15 hours, 39 minutes ago -
June 2025 Office non-Security Updates
by
PKCano
1 day, 11 hours ago -
Secure Boot Update Fails after KB5058405 Installed
by
SteveIT
8 hours, 5 minutes ago -
Firefox Red Panda Fun Stuff
by
Lars220
1 day, 11 hours ago -
How start headers and page numbers on page 3?
by
Davidhs
1 day, 22 hours ago -
Attack on LexisNexis Risk Solutions exposes data on 300k +
by
Nibbled To Death By Ducks
1 day ago -
Windows 11 Insider Preview build 26200.5622 released to DEV
by
joep517
2 days, 6 hours ago -
Windows 11 Insider Preview build 26120.4230 (24H2) released to BETA
by
joep517
2 days, 6 hours ago -
MS Excel 2019 Now Prompts to Back Up With OneDrive
by
lmacri
1 day, 20 hours ago -
Firefox 139
by
Charlie
1 day, 13 hours ago -
Who knows what?
by
Will Fastie
15 hours, 22 minutes ago -
My top ten underappreciated features in Office
by
Peter Deegan
2 days, 7 hours ago -
WAU Manager — It’s your computer, you are in charge!
by
Deanna McElveen
1 hour, 2 minutes ago -
Misbehaving devices
by
Susan Bradley
1 day, 3 hours ago -
.NET 8.0 Desktop Runtime (v8.0.16) – Windows x86 Installer
by
WSmeyerbos
3 days, 13 hours ago -
Neowin poll : What do you plan to do on Windows 10 EOS
by
Alex5723
12 hours, 15 minutes ago -
May 31, 2025—KB5062170 (OS Builds 22621.5415 and 22631.5415 Out-of-band
by
Alex5723
3 days, 11 hours ago -
Discover the Best AI Tools for Everything
by
Alex5723
2 days, 11 hours ago -
Edge Seems To Be Gaining Weight
by
bbearren
3 days, 2 hours ago -
Rufus is available from the MSFT Store
by
PL1
3 days, 10 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.