Re: $$Excel-Macros$$ Error in VBA

2014-11-20 Thread Paul Schreiner
e know if I can help. Paul - “Do all the good you can, By all the means you can, In all the ways you can, In all the places you can, At all the times you can, To all the people you can, As long as ever you can.” - John Wesley -

Re: $$Excel-Macros$$ Error in VBA

2014-11-20 Thread USMAN TARIQ
gt;>> Well, that answers that question. >>> you have it in the ThisWorkbook module, which is correct. >>> >>> Which means that it probably actually RAN, but >>> >>> Weekday(Date) = 2 >>> >>> will return "false&quo

Re: $$Excel-Macros$$ Error in VBA

2014-11-20 Thread USMAN TARIQ
>> *Paul* >> - >> >> >> >> >> >> >> >> *“Do all the good you can,By all the means you can,In all the ways you >> can,In all the places you can,At all the times you can,To all the people >> you can,As long as ever you can.” - John

Re: $$Excel-Macros$$ Error in VBA

2014-11-20 Thread USMAN TARIQ
> >*From:* USMAN TARIQ > *To:* excel-macros@googlegroups.com > *Sent:* Thursday, November 20, 2014 9:19 AM > > *Subject:* Re: $$Excel-Macros$$ Error in VBA > > Thanks again for well versed explanation ! :) , what i did i just copied > the whole code from the sh

Re: $$Excel-Macros$$ Error in VBA

2014-11-20 Thread Paul Schreiner
ursday, November 20, 2014 9:19 AM >Subject: Re: $$Excel-Macros$$ Error in VBA > > > >Thanks again for well versed explanation ! :) , what i did i just copied the >whole code from the sheet module > > >and then i put Private Sub Workbook_Open() in the ThisWorkBo

Re: $$Excel-Macros$$ Error in VBA

2014-11-20 Thread USMAN TARIQ
--- > > > > > > > > *“Do all the good you can,By all the means you can,In all the ways you > can,In all the places you can,At all the times you can,To all the people > you can,As long as ever you can.” - John Wesley* > - > >*From:* USMAN TARIQ > *

Re: $$Excel-Macros$$ Error in VBA

2014-11-19 Thread Paul Schreiner
an, To all the people you can, As long as ever you can.” - John Wesley - From: USMAN TARIQ >To: excel-macros@googlegroups.com >Sent: Wednesday, November 19, 2014 3:02 PM >Subject: Re: $$Excel-Macros$$ Error in VBA > > > >Private Sub Worksheet_Activate() > &g

Re: $$Excel-Macros$$ Error in VBA

2014-11-19 Thread USMAN TARIQ
gt; _Open >> _BeforeSave >> _AfterSave >> _Activate >> _Deactivate >> >> another "feature" is that if you have several macros in a module, >> selecting the right-hand pull-down will show you the macro names and >> allow you to "jump" to the macro instead of sc

Re: $$Excel-Macros$$ Error in VBA

2014-11-19 Thread USMAN TARIQ
ike checking all files ending in .xls) > but it doesn't have the capability to check dates. > > To compare dates, you'd need to use the filesytem object. > > in your case, I'd probably do something like: > > Public Function FileFolderExists(strFullPath As String) As Bo

Re: $$Excel-Macros$$ Error in VBA

2014-11-19 Thread Paul Schreiner
n are BOLD hope this helps! Paul - “Do all the good you can, By all the means you can, In all the ways you can, In all the places you can, At all the times you can, To all the people you can, As long as ever you can.” - John Wesley

Re: $$Excel-Macros$$ Error in VBA

2014-11-19 Thread USMAN TARIQ
ory) = vbNullString Then > FileFolderExists = True* > > *EarlyExit:* > *On Error GoTo 0* > *End Function* > > > > On Wed, Nov 19, 2014 at 11:00 AM, Paul Schreiner > wrote: > > What is not working? > Does it give an error? > > You've got several

Re: $$Excel-Macros$$ Error in VBA

2014-11-19 Thread Paul Schreiner
ow, this explanation is long. But I wasn't doing much else on my lunch break! let me know if you have any questions. Paul - “Do all the good you can, By all the means you can, In all the ways you can, In all the places you can, At all the times you can,

Re: $$Excel-Macros$$ Error in VBA

2014-11-19 Thread Paul Schreiner
the people you can, As long as ever you can.” - John Wesley - > > From: USMAN TARIQ >To: excel-macros@googlegroups.com >Sent: Wednesday, November 19, 2014 11:19 AM >Subject: Re: $$Excel-Macros$$ Error in

Re: $$Excel-Macros$$ Error in VBA

2014-11-19 Thread USMAN TARIQ
places you can,At all the times you can,To all the people > you can,As long as ever you can.” - John Wesley* > - > >*From:* USMAN TARIQ > *To:* excel-macros@googlegroups.com > *Sent:* Wednesday, November 19, 2014 10:39 AM > *Subject:* Re: $$Excel-M

Re: $$Excel-Macros$$ Error in VBA

2014-11-19 Thread Paul Schreiner
;Sent: Wednesday, November 19, 2014 10:39 AM >Subject: Re: $$Excel-Macros$$ Error in VBA > > > >please advise > > >On Tue, Nov 18, 2014 at 12:50 PM, USMAN TARIQ >wrote: > >Following is not woreking >> >> >> >> >>PrivateSu

Re: $$Excel-Macros$$ Error in VBA

2014-11-19 Thread USMAN TARIQ
please advise On Tue, Nov 18, 2014 at 12:50 PM, USMAN TARIQ wrote: > Following is not woreking > > > > Private Sub Workbook_Open() > Dim ws As Worksheet > > For Each ws In ThisWorkbook.Worksheets > With ws > .EnableOutlining = True > .Protect UserInterface

Re: $$Excel-Macros$$ Error in VBA

2014-11-18 Thread USMAN TARIQ
Following is not woreking Private Sub Workbook_Open() Dim ws As Worksheet For Each ws In ThisWorkbook.Worksheets With ws .EnableOutlining = True .Protect UserInterfaceOnly:=True, AllowFiltering:=True, _ AllowFormattingColumns:=True, AllowInser

Re: $$Excel-Macros$$ Error in VBA

2014-11-18 Thread USMAN TARIQ
also i want i have 2 sheets in my work book, want to use the *Private Sub Workbook_Open() , its not working for me :(* On Tue, Nov 18, 2014 at 11:20 AM, USMAN TARIQ wrote: > *is the following fine ?* > > Public Function FileFolderExists(strFullPath As String) As Boolean > 'Author : Usman T

Re: $$Excel-Macros$$ Error in VBA

2014-11-18 Thread USMAN TARIQ
*is the following fine ?* Public Function FileFolderExists(strFullPath As String) As Boolean 'Author : Usman Tariq 'Macro Purpose: Check if a file or folder exists On Error GoTo EarlyExit If Not Dir(strFullPath, vbDirectory) = vbNullString Then FileFolderExists = True* And (DateDiff(

Re: $$Excel-Macros$$ Error in VBA

2014-11-18 Thread USMAN TARIQ
following is the code in the *Module * Public Function FileFolderExists(strFullPath As String) As Boolean 'Author : Usman Tariq 'Macro Purpose: Check if a file or folder exists On Error GoTo EarlyExit If Not Dir(strFullPath, vbDirectory) = vbNullString Then FileFolderExists = True E

Re: $$Excel-Macros$$ Error in VBA

2014-11-18 Thread Paul Schreiner
you can, To all the people you can, As long as ever you can.” - John Wesley - > > From: USMAN TARIQ >To: excel-macros@googlegroups.com >Sent: Tuesday, November 18, 2014 10:26 AM >Subject: Re: $$Excel-Ma

Re: $$Excel-Macros$$ Error in VBA

2014-11-18 Thread USMAN TARIQ
i have figured out the issue the following code works . but actually in our project the updated files are replaced everyday . For example there is a file called Report A, it was delivered on 11/17 , but is not delivered on 11/18 , in the folder the one that is delivered still exist , but in my ex

Re: $$Excel-Macros$$ Error in VBA

2014-11-13 Thread USMAN TARIQ
I FIGURED IT OUT ! , :) There was " _" missing after "And" its working now Thanks On Thu, Nov 13, 2014 at 10:42 AM, Paul Schreiner wrote: > is FileFolderExists() a custom function? > > is this email wrapping? > that is, is this actually one line? > > If FileFolderExists("\\cf3.pepsico.pvt\psr

Re: $$Excel-Macros$$ Error in VBA

2014-11-13 Thread Paul Schreiner
is FileFolderExists() a custom function? is this email wrapping? that is, is this actually one line? If FileFolderExists("\\cf3.pepsico.pvt\psra\Output\BI4\Exec Dollars - Current Period.pdf")and weekday(date) = 2 Then if so, be sure there's a space after the ) If FileFolderExists("\\cf3.pep