Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 06-27-2014, 01:17 PM
shilabrow shilabrow is offline How to create an error debug message Windows Vista How to create an error debug message Office 2007
Advanced Beginner
How to create an error debug message
 
Join Date: Apr 2014
Posts: 45
shilabrow is on a distinguished road
Default How to create an error debug message

How to create an error debug message if need. All help appreciated. Thanks

Sub Test2()
'
' Test2 Macro
'
'
Sheets("Query").Select
Range("Table_Query_from_MS_Access_Database[[#Headers],[IsMail]]").Select
Selection.AutoFilter
ActiveSheet.ListObjects("Table_Query_from_MS_Acces s_Database").Range. _
AutoFilter Field:=4, Criteria1:="=Yes", Operator:=xlOr, Criteria2:="="
Cells.Select
Selection.Copy
Sheets("Result").Select
Range("A1").Select
ActiveSheet.Paste
Sheets("Query").Select
Range("E6").Select
Application.CutCopyMode = False
Selection.AutoFilter
Sheets("Score_Analysis").Select
Columns("A:F").Select
Selection.Copy
Sheets("Test").Select
Range("A1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Score_Analysis").Select
Application.CutCopyMode = False
Columns("C:F").Select
ActiveWorkbook.Worksheets("Score_Analysis").ListOb jects("Score_Table").Sort. _
SortFields.Add Key:=Range("Score_Table[[#Headers],[Nature/ " & Chr(10) & "Mail]]"), _
SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal


Range("C500:F500").Select
Selection.AutoFill Destination:=Range("C2:F500"), Type:=xlFillDefault
Cells.Select
Cells.EntireRow.AutoFit
Range("A1").Select
End Sub
Reply With Quote
  #2  
Old 06-27-2014, 07:30 PM
whatsup whatsup is offline How to create an error debug message Windows 7 64bit How to create an error debug message Office 2010 32bit
Competent Performer
 
Join Date: May 2014
Posts: 137
whatsup will become famous soon enough
Default

Hi

What you mean by "an error debug message "
In case of an error, excel will create the appropiate message itself.

But probably you don't want that message, but rather one you create yourself. That's called error handling, and can become quite tricky. Usually you should write the code the way to avoid errors taking in consideration which errors possibly might come up during runtime.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to create an error debug message Outlook Error message jdc15371 Outlook 1 06-23-2014 06:25 AM
How to create an error debug message Automation error Unknown error" message once they open the Excel file hlina Excel 1 10-08-2013 09:14 PM
How to create an error debug message Create Rule to forward message to mobile# JoyConner Outlook 1 04-21-2011 05:44 PM
Error message White House Outlook 1 12-07-2010 04:52 AM
Microsoft Office 2003 winword.exe Debug Error! abnormal prog elo1bev Word 0 12-22-2005 10:15 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:26 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft