Hi Omar,

-5004 is equivalent to VB constant xlRTL (means Right to Left)

Difference between 2 lines is:
1st Line - Turn the Excel Sheet direction for all sheets and new
workbooks that will be opened in the Application. So, basically it
will change the default settings of the Excel Application.

2nd Line - Turn the Sheet direction only for one sheet(in this case
first sheet of the workbook as Sheets(1) is used). The Excel
application and new workbooks will remain unaffected.

Please Note: Like, xlRTL - xlLTR is also available.




________________________________________
Regards
Ashish Jain
McKinsey India Knowledge Center
(Microsoft Certified Application Specialist)
(Microsoft Certified Professional)
http://www.excelitems.com
http://www.openexcel.com
________________________________________


On Oct 29, 12:23 am, عمـــــــــــــر <omar27...@gmail.com> wrote:
> Sheets(1).Application.DefaultSheetDirection = -5004
>
> Sheets(1).DisplayRightToLeft = true
>
> This number -5004
>
> What is this number mean?
>
> And what is the different between that two lines?

-- 
----------------------------------------------------------------------------------
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com

<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/pages/discussexcelcom/160307843985936?v=wall&ref=ts

Reply via email to