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

2014-11-20 Thread USMAN TARIQ
may be the code could be smaller , but being a Starter in VBA , thats the only thing that came to my mind , and the time was also limited , But thanks to you , you make it complete in such a easy way . On Thu, Nov 20, 2014 at 9:32 AM, USMAN TARIQ wrote: > one report example is following >

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

2014-11-20 Thread USMAN TARIQ
on and on. there is a specific box for each report for each day.. the above is code if just for one report , just imagine how long the code is for 78 reports :) On Thu, Nov 20, 2014 at 9:30 AM, USMAN TARIQ wrote: > actually the code is really really big :) this is just for example

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* > -

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 USMAN TARIQ
doing any thing :(* On Wed, Nov 19, 2014 at 2:59 PM, USMAN TARIQ wrote: > Private Sub Worksheet_Activate() > > End Sub > > so do i need to put my code between the above two ? > > i put the > > On Wed, Nov 19, 2014 at 1:35 PM, Paul Schreiner > wrote: > >>

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

2014-11-19 Thread USMAN TARIQ
ght-hand pull-down will show you the macro names and allow > you to "jump" to the macro instead of scrolling to them. > (really helpful when you have 5000 lines in 10 macros in a single module!) > > In the Thisworkbook and Sheet modules, the event macros that you've > w

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

2014-11-19 Thread USMAN TARIQ
- > > The Operating System (Windows, MAC, Unix) has a system for storing files. > Hence, when dealing with files, Microsoft (and VBA) utilizes a > "FileSystem" object. > > I usually create a variable fso (File System Object) > and set it to be defined as a File System Ob

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

2014-11-19 Thread USMAN TARIQ
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* *EarlyExit:* *On Error GoTo 0* *End Funct

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

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

2014-11-18 Thread USMAN TARIQ
, AllowInsertingRows:=True End With NextEnd Sub On Tue, Nov 18, 2014 at 12:46 PM, USMAN TARIQ wrote: > 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 >

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 > 'Aut

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

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 FileFolderExi

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

2014-11-18 Thread USMAN TARIQ
eave it blank* On Thu, Nov 13, 2014 at 10:49 AM, USMAN TARIQ wrote: > 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 File

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

2014-11-13 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* > - >

$$Excel-Macros$$ Error in VBA

2014-11-13 Thread USMAN TARIQ
Compile Error: Syntax Error the above error is coming for the below code . it happens when inject the Day condition Private Sub TestFileExistence() If FileFolderExists("\\cf3.pepsico.pvt\psra\Output\BI4\Exec Dollars - Current Period.pdf")and weekday(date) = 2 Then Range("A1").Value = "X"