Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-24-2015, 11:04 PM
gmayor's Avatar
gmayor gmayor is offline Outlook macro to check a value of a cell in an attachment and send an email based on that value Windows 7 64bit Outlook macro to check a value of a cell in an attachment and send an email based on that value Office 2010 32bit
Expert
 
Join Date: Aug 2014
Posts: 4,144
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

The Excel format is not the problem What are important are these three values, which must match the Excel file being processed.



Const strCell As String = "E2"
Const strWorkBook As String = "Count0To12Hr.xls"
Const strSheet As String = "Count0To12Hr"

Also change
Code:
lngCell = xlSheet.Range(strCell)
to
Code:
lngCell = Val(xlSheet.Range(strCell))
which should resolve the issue with negative values.

While testing make the Excel app visible so that if it does crash you are not left with a hidden Excel application.

Code:
xlApp.Visible = True
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
  #2  
Old 03-25-2015, 07:11 AM
ketangarg86 ketangarg86 is offline Outlook macro to check a value of a cell in an attachment and send an email based on that value Windows 8 Outlook macro to check a value of a cell in an attachment and send an email based on that value Office 2013
Novice
Outlook macro to check a value of a cell in an attachment and send an email based on that value
 
Join Date: Oct 2014
Posts: 11
ketangarg86 is on a distinguished road
Default

Now everything works as expected. Thanks a zillion Mr. Mayor

REALLY APPRECIATE your help.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Outlook macro to check a value of a cell in an attachment and send an email based on that value Create macro program to automatically email outlook with a visible cell range BillMaintenance Excel Programming 19 03-11-2015 03:19 PM
Can anyone here tweek this macro for renaming Excel files based on a cell's contents? chrisd2000 Excel Programming 6 07-01-2014 01:53 PM
Email alert based on value in cell sweetcuda Excel 0 03-12-2014 12:44 PM
Outlook macro to check a value of a cell in an attachment and send an email based on that value Command button - save in temp folder and send email with attachment bigbird69 Word VBA 13 11-18-2012 10:06 PM
Macro based on cell value ubns Excel Programming 1 05-07-2012 04:03 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:36 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