macro code to open most recent file.

I am currently using the following code.  I am trying to find some 
additional code that will go to a designated folder and open the most recent 
excel file and run the remaining syntax.  So this new code would go to the 
macros folder and find the most recent quote sheet1.xls and open it and run 
the remainder of the macro it would do the same for the remaining  quote 
sheet files.  If I had to save the quote sheet test1, test2, test3 into 
separate folders I can do that as well.

Any help would be greatly appreciated.

Sub aaa()
Workbooks.Open Filename:="C:\Documents and Settings\Default\My 
Documents\macros\quote sheet test1.xls"

Workbooks("quote sheet test1.xls").Activate

'nominate the output file
Set OutFile = Workbooks("results of running macro.xls").Sheets("sheet2")
OutPutRow = 1 'nominate the  starting row
Workbooks("quote sheet test1.xls").Activate 'go to the first sample  file
Range("a1:" & 
Range("a1").Cells.SpecialCells(xlCellTypeLastCell).Address).Copy 
Destination:=OutFile.Cells(OutPutRow, 1) 'copy and output the data from the 
first file
OutPutRow = OutFile.Range("a1").Cells.SpecialCells(xlCellTypeLastCell).Row + 
1 'Range("a65536").End(xlUp).Row + 1 'update the  output row based on the 
data in the first file

Workbooks.Open Filename:="C:\Documents and Settings\Default\My 
Documents\macros\quote sheet test2.xls"

Workbooks("quote sheet test2.xls").Activate

Workbooks("quote sheet test2.xls").Activate
Range("a1:" & 
Range("a1").Cells.SpecialCells(xlCellTypeLastCell).Address).Copy 
Destination:=OutFile.Cells(OutPutRow, 1)  'copy and output the data from the 
second file
OutPutRow = OutFile.Range("a1").Cells.SpecialCells(xlCellTypeLastCell).Row + 
1 'update the  output row based on the data in the second file

Workbooks.Open Filename:="C:\Documents and Settings\Default\My 
Documents\macros\quote sheet test3.xls"

Workbooks("quote sheet test3.xls").Activate

Workbooks("quote sheet test3.xls").Activate
Range("a1:" & 
Range("a1").Cells.SpecialCells(xlCellTypeLastCell).Address).Copy 
Destination:=OutFile.Cells(OutPutRow, 1)  'copy and output the data from the 
second file

End Sub


Regards,


Judd 


0
6/9/2005 8:44:32 PM
excel 39879 articles. 2 followers. Follow

4 Replies
558 Views

Similar Articles

[PageSpeed] 53

judd,

You can't have more than one file with the same name
in the same folder.  So any file in a folder is the most recent.
The following code opens and closes the files, but you
have to add the code to massage the files while they are open.

Regards,
Jim Cone
San Francisco, USA

 '---------------------------------
Sub ChangeDataInFiles()
'Jim Cone - San Francisco, USA - Jun 09, 2005
'*Requires a project reference to "Microsoft Scripting Runtime" (scrrun.dll)*
'Opens/closes files in the specified folder that have a numeric suffix
'that falls within a specified range.

 Dim objFSO    As Scripting.FileSystemObject
 Dim objFolder As Scripting.Folder
 Dim objFile   As Scripting.File
 Dim lngCount  As Long
 Dim lngNum    As Long
 Dim strPath   As String
'Specify the base file name.
 Const strName As String = "quote sheet test"
 
  'Specify the folder...
   strPath = "C:\Documents and Settings\Default\MyDocuments\macros\"
  'Establish object references
   Set objFSO = New Scripting.FileSystemObject
   Set objFolder = objFSO.GetFolder(strPath)
  'first numeric suffix to look for
   lngCount = 1
   
   For Each objFile In objFolder.Files
       lngNum = lngCount
       
       Do
         If objFile.Name = strName & lngNum & ".xls" Then
             Workbooks.Open strPath & objFile.Name
            
            '*Insert code to do stuff to workbook*
                         
             Workbooks(objFile.Name).Close savechanges:=True  'or False
             lngCount = lngCount + 1
             Exit Do
         Else
            lngNum = lngNum = 1
         End If
       Loop While lngNum < 4  'One more than the number of files
       
       If lngCount > 3 Then Exit For  'The number of files to open
       
   Next 'objFile
   
   Set objFile = Nothing
   Set objFSO = Nothing
   Set objFolder = Nothing
End Sub
'----------------------------------


<judd_sandstrom@bellsouth.net> wrote in message
news:eeUmIQTbFHA.3808@TK2MSFTNGP14.phx.gbl...
I am currently using the following code.  I am trying to find some 
additional code that will go to a designated folder and open the most recent 
excel file and run the remaining syntax.  So this new code would go to the 
macros folder and find the most recent quote sheet1.xls and open it and run 
the remainder of the macro it would do the same for the remaining  quote 
sheet files.  If I had to save the quote sheet test1, test2, test3 into 
separate folders I can do that as well.

Any help would be greatly appreciated.

Sub aaa()
Workbooks.Open Filename:="C:\Documents and Settings\Default\My 
Documents\macros\quote sheet test1.xls"

Workbooks("quote sheet test1.xls").Activate
'nominate the output file
Set OutFile = Workbooks("results of running macro.xls").Sheets("sheet2")
OutPutRow = 1 'nominate the  starting row
Workbooks("quote sheet test1.xls").Activate 'go to the first sample  file
Range("a1:" & 
Range("a1").Cells.SpecialCells(xlCellTypeLastCell).Address).Copy 
Destination:=OutFile.Cells(OutPutRow, 1) 'copy and output the data from the 
first file
OutPutRow = OutFile.Range("a1").Cells.SpecialCells(xlCellTypeLastCell).Row + 
1 'Range("a65536").End(xlUp).Row + 1 'update the  output row based on the 
data in the first file
Workbooks.Open Filename:="C:\Documents and Settings\Default\My 
Documents\macros\quote sheet test2.xls"
Workbooks("quote sheet test2.xls").Activate
Workbooks("quote sheet test2.xls").Activate
Range("a1:" & 
Range("a1").Cells.SpecialCells(xlCellTypeLastCell).Address).Copy 
Destination:=OutFile.Cells(OutPutRow, 1)  'copy and output the data from the 
second file
OutPutRow = OutFile.Range("a1").Cells.SpecialCells(xlCellTypeLastCell).Row + 
1 'update the  output row based on the data in the second file
Workbooks.Open Filename:="C:\Documents and Settings\Default\My 
Documents\macros\quote sheet test3.xls"
Workbooks("quote sheet test3.xls").Activate
Workbooks("quote sheet test3.xls").Activate
Range("a1:" & 
Range("a1").Cells.SpecialCells(xlCellTypeLastCell).Address).Copy 
Destination:=OutFile.Cells(OutPutRow, 1)  'copy and output the data from the 
second file
End Sub
Regards,
Judd 


0
jim.coneXXX (771)
6/9/2005 10:11:58 PM
Correction...
lngNum = lngNum = 1

should be
lngNum = lngNum + 1

(my test code and the posted code differed)

Jim Cone


"Jim Cone" <jim.coneXXX@rcn.comXXX> wrote in message news:e5oUGBUbFHA.3192@TK2MSFTNGP10.phx.gbl...
judd,
You can't have more than one file with the same name
in the same folder.  So any file in a folder is the most recent.
The following code opens and closes the files, but you
have to add the code to massage the files while they are open.
Regards,
Jim Cone
San Francisco, USA


 '---------------------------------
Sub ChangeDataInFiles()
'Jim Cone - San Francisco, USA - Jun 09, 2005
'*Requires a project reference to "Microsoft Scripting Runtime" (scrrun.dll)*
'Opens/closes files in the specified folder that have a numeric suffix
'that falls within a specified range.

 Dim objFSO    As Scripting.FileSystemObject
 Dim objFolder As Scripting.Folder
 Dim objFile   As Scripting.File
 Dim lngCount  As Long
 Dim lngNum    As Long
 Dim strPath   As String
'Specify the base file name.
 Const strName As String = "quote sheet test"
 
  'Specify the folder...
   strPath = "C:\Documents and Settings\Default\MyDocuments\macros\"
  'Establish object references
   Set objFSO = New Scripting.FileSystemObject
   Set objFolder = objFSO.GetFolder(strPath)
  'first numeric suffix to look for
   lngCount = 1
   
   For Each objFile In objFolder.Files
       lngNum = lngCount
       
       Do
         If objFile.Name = strName & lngNum & ".xls" Then
             Workbooks.Open strPath & objFile.Name
            
            '*Insert code to do stuff to workbook*
                         
             Workbooks(objFile.Name).Close savechanges:=True  'or False
             lngCount = lngCount + 1
             Exit Do
         Else
            lngNum = lngNum = 1'<<<<change =1 to + 1
         End If
       Loop While lngNum < 4  'One more than the number of files
       
       If lngCount > 3 Then Exit For  'The number of files to open
       
   Next 'objFile
   
   Set objFile = Nothing
   Set objFSO = Nothing
   Set objFolder = Nothing
End Sub
'----------------------------------

0
jim.coneXXX (771)
6/9/2005 10:22:55 PM
Jim,
        Thank you very much for your patience as I am a new to VBA.  I have 
a couple of questions.

Where should I put this code that you wrote?  Prior to each file opening?

"but you have to add the code to massage the files while they are open."  I 
am not quite sure what you mean here.  Can you please elaborate.


Thank You,


Judd



"Jim Cone" <jim.coneXXX@rcn.comXXX> wrote in message 
news:e5oUGBUbFHA.3192@TK2MSFTNGP10.phx.gbl...
> judd,
>
> You can't have more than one file with the same name
> in the same folder.  So any file in a folder is the most recent.
> The following code opens and closes the files, but you
> have to add the code to massage the files while they are open.
>
> Regards,
> Jim Cone
> San Francisco, USA
>
> '---------------------------------
> Sub ChangeDataInFiles()
> 'Jim Cone - San Francisco, USA - Jun 09, 2005
> '*Requires a project reference to "Microsoft Scripting Runtime" 
> (scrrun.dll)*
> 'Opens/closes files in the specified folder that have a numeric suffix
> 'that falls within a specified range.
>
> Dim objFSO    As Scripting.FileSystemObject
> Dim objFolder As Scripting.Folder
> Dim objFile   As Scripting.File
> Dim lngCount  As Long
> Dim lngNum    As Long
> Dim strPath   As String
> 'Specify the base file name.
> Const strName As String = "quote sheet test"
>
>  'Specify the folder...
>   strPath = "C:\Documents and Settings\Default\MyDocuments\macros\"
>  'Establish object references
>   Set objFSO = New Scripting.FileSystemObject
>   Set objFolder = objFSO.GetFolder(strPath)
>  'first numeric suffix to look for
>   lngCount = 1
>
>   For Each objFile In objFolder.Files
>       lngNum = lngCount
>
>       Do
>         If objFile.Name = strName & lngNum & ".xls" Then
>             Workbooks.Open strPath & objFile.Name
>
>            '*Insert code to do stuff to workbook*
>
>             Workbooks(objFile.Name).Close savechanges:=True  'or False
>             lngCount = lngCount + 1
>             Exit Do
>         Else
>            lngNum = lngNum = 1
>         End If
>       Loop While lngNum < 4  'One more than the number of files
>
>       If lngCount > 3 Then Exit For  'The number of files to open
>
>   Next 'objFile
>
>   Set objFile = Nothing
>   Set objFSO = Nothing
>   Set objFolder = Nothing
> End Sub
> '----------------------------------
>
>
> <judd_sandstrom@bellsouth.net> wrote in message
> news:eeUmIQTbFHA.3808@TK2MSFTNGP14.phx.gbl...
> I am currently using the following code.  I am trying to find some
> additional code that will go to a designated folder and open the most 
> recent
> excel file and run the remaining syntax.  So this new code would go to the
> macros folder and find the most recent quote sheet1.xls and open it and 
> run
> the remainder of the macro it would do the same for the remaining  quote
> sheet files.  If I had to save the quote sheet test1, test2, test3 into
> separate folders I can do that as well.
>
> Any help would be greatly appreciated.
>
> Sub aaa()
> Workbooks.Open Filename:="C:\Documents and Settings\Default\My
> Documents\macros\quote sheet test1.xls"
>
> Workbooks("quote sheet test1.xls").Activate
> 'nominate the output file
> Set OutFile = Workbooks("results of running macro.xls").Sheets("sheet2")
> OutPutRow = 1 'nominate the  starting row
> Workbooks("quote sheet test1.xls").Activate 'go to the first sample  file
> Range("a1:" &
> Range("a1").Cells.SpecialCells(xlCellTypeLastCell).Address).Copy
> Destination:=OutFile.Cells(OutPutRow, 1) 'copy and output the data from 
> the
> first file
> OutPutRow = OutFile.Range("a1").Cells.SpecialCells(xlCellTypeLastCell).Row 
> +
> 1 'Range("a65536").End(xlUp).Row + 1 'update the  output row based on the
> data in the first file
> Workbooks.Open Filename:="C:\Documents and Settings\Default\My
> Documents\macros\quote sheet test2.xls"
> Workbooks("quote sheet test2.xls").Activate
> Workbooks("quote sheet test2.xls").Activate
> Range("a1:" &
> Range("a1").Cells.SpecialCells(xlCellTypeLastCell).Address).Copy
> Destination:=OutFile.Cells(OutPutRow, 1)  'copy and output the data from 
> the
> second file
> OutPutRow = OutFile.Range("a1").Cells.SpecialCells(xlCellTypeLastCell).Row 
> +
> 1 'update the  output row based on the data in the second file
> Workbooks.Open Filename:="C:\Documents and Settings\Default\My
> Documents\macros\quote sheet test3.xls"
> Workbooks("quote sheet test3.xls").Activate
> Workbooks("quote sheet test3.xls").Activate
> Range("a1:" &
> Range("a1").Cells.SpecialCells(xlCellTypeLastCell).Address).Copy
> Destination:=OutFile.Cells(OutPutRow, 1)  'copy and output the data from 
> the
> second file
> End Sub
> Regards,
> Judd
>
> 


0
6/10/2005 12:12:36 AM
Judd,

'I have included the code to "massage" the files.
'It should be complete?  Just run it instead of your code.
'Try it on a copy of your workbooks first!

'To answer your other question, the code I posted earlier,
'found, opened the files and closed them.  It did not do
'anything with the data in the files. 

'Please note the project reference required!

'--------------------------
Sub ChangeDataInFiles()
'Jim Cone - San Francisco, USA - Jun 09, 2005
'*Requires a project reference to "Microsoft Scripting Runtime" (scrrun.dll)*
'Opens/closes files in the specified folder that have a numeric suffix
'that falls within a specified range.
'Copies the used range on the first sheet in each file and
'pastes it below all other data on a new sheet added to the 'other' file.

 Dim objFSO    As Scripting.FileSystemObject
 Dim objFolder As Scripting.Folder
 Dim objFile   As Scripting.File
 Dim OutPutRow As Long
 Dim lngCount  As Long
 Dim lngNum    As Long
 Dim strPath   As String
 Dim OutSheet  As Excel.Worksheet
 
'Specifies the base file name.
 Const strName As String = "quote sheet test"
 
  'Adds a new sheet to receive the data and names it.
   With Workbooks("results of running macro.xls")
       .Worksheets.Add(Count:=1, after:=.Worksheets(.Worksheets.Count)).Name = _
       "New Output " & Format$(Date, "mmddyy")
       Set OutSheet = .Worksheets(.Worksheets.Count)
   End With
   OutPutRow = 1

  'Specify the folder...
   strPath = "C:\Documents and Settings\Default\MyDocuments\macros\"

  'Establish object references
   Set objFSO = New Scripting.FileSystemObject
   Set objFolder = objFSO.GetFolder(strPath)

  'first numeric suffix to look for
   lngCount = 1
   
   For Each objFile In objFolder.Files
       lngNum = lngCount
       
       Do
         'Find the file and open it.
         If objFile.Name = strName & lngNum & ".xls" Then
             Workbooks.Open strPath & objFile.Name
            
            '*Code to do stuff has been added here*
            'Copies the used range and pastes it on the added sheet,
            'below any existing data.
             Workbooks(objFile.Name).Worksheets(1).UsedRange.Copy _
                       Destination:=OutSheet.Cells(OutPutRow, 1)
             OutPutRow = OutSheet.Cells.SpecialCells(xlCellTypeLastCell).Row + 1
            
            'Close the file without saving it.
             Workbooks(objFile.Name).Close savechanges:=False
             lngCount = lngCount + 1
             Exit Do
         Else
            lngNum = lngNum + 1
         End If
       Loop While lngNum < 4  'One more than the number of files
       
       If lngCount > 3 Then Exit For  'The number of files to open
       
   Next 'objFile
   
   Set OutSheet = Nothing
   Set objFile = Nothing
   Set objFSO = Nothing
   Set objFolder = Nothing
End Sub
'------------------------------


<judd_sandstrom@bellsouth.net> wrote in message 
news:%23%23muYEVbFHA.3200@tk2msftngp13.phx.gbl...
Jim,
Thank you very much for your patience as I am a new to VBA.  
I have a couple of questions.

Where should I put this code that you wrote?  Prior to each file opening?
"but you have to add the code to massage the files while they are open."  I 
am not quite sure what you mean here.  Can you please elaborate.
Thank You,
Judd


0
jim.coneXXX (771)
6/10/2005 1:57:11 AM
Reply:

Similar Artilces:

Excedl 2003 / How to automize file opening
Hello Everyone below, my issue with excel 2003: When opening my "mainfile.xls", I wish it could open others "datafileS.xls", needed for my calculation within "mainfile.xls". All files are located in the same directory. a. mainfile.xls b. datafile1.xls c. datafile2.xls d. datafile3.xls In "mainfile.xls", I do use function such as INDIRECT("Datafile1.xls.....), to calculate various figures using my data files. My main problem is that if all my "datafileS.xls" are not opened when launching "mainfile.xls", this one cannot ret...

Macro warning with no macros
I have a workbook that when I try to open it I get the warning tellin me it contains macros and asking whether I want to Enable or Disabl them. I put no macros, no VB scripts, nothing at all in the workboo other than standard Excel formulas and some charts. I developed it i Excel 2002, SP-2, but have moved it back and forth between tw computers, the other which has Excel 97. Regardless of whether Enable or Disable or change the security settings so as not to get th warning, once the workbook is open even if I go t Tools-Macro-Macros... it lists no macros. How can I find out what's cau...

Macro
Can anybody tell me how to kick off a macro automatically as file is opened? Regards ...

saving the history of recently used excel documentsto another comp
Reimaging a computer and wanting to know if I can export the excel history to the new image. Most files are on the network and not sure where they are, don't want to remap them all If you're referring to the files listed at the bottom of the File menu you'd have to run the Regedit program and go to this key: HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Excel\Recent Files replacing the "11.0" with your Excel version if different. Then you would have to right click on the Recent Files folder and Export it. After the reimage you would double-click the resultin...

Convert old PPT file
My company recently upgrade the office 2003 to office 2007. It works well for most of the users except one. He had thousands of old powerpoint slides which created around year 1996,1997. By using right click to check the file properties, it shows the the application name is 'Microsoft Powerpoint 4.0' .These file can be opened by powerpoint 2003 but can not being opened by powerpoint 2007. Does anyone have idea how I can bulk convert those files to powerpoint 2003 format? Thanks James Steve has a macro here http://www.pptfaq.com/FAQ00740.htm -- john ATSIGN PPTAl...

generating .csv file
Hi, Is there any process (Code) to generate .csv files to all entities in MSCRM at a time. regards, sailaja. I think you are not clear with question. 1. You can export data to .csv file or excel file from any entity 2. You can export customization to .xml file which are enttities list etc. -- Regards, Imran MS CRM Certified Professional http://microsoftcrm3.blogspot.com Chat with me on MSN / Gmail / Skype : ID Is :.. mscrmexpert@gmail.com "sailaja.crm@gmail.com" wrote: > Hi, > Is there any process (Code) to generate .csv files to all entities in > MSCRM at a ...

Macro
Version: 2008 Operating System: Mac OS X 10.4 (Tiger) Processor: intel Hi, I'm thinking of buying Mac: Office 2008, but before I do I want to check that I will be able to download Scritpsmart collection of templates without any glitches: <http://www.bbc.co.uk/writersroom/scriptsmart/faq.shtml> Does anyone know if I can do this? Regards, SP. In article <ee98ff5.-1@webcrossing.caR9absDaxw>, StregaItalia@officeformac.com wrote: > Version: 2008 > Operating System: Mac OS X 10.4 (Tiger) > Processor: intel > > Hi, > > I'm thinking of buying Mac: Of...

How to Stop Worksheet_Change event from running during code execution
I'm sorry If I've asked this before but I can't find an answer to it. I have the following 2 events in a worksheet module.... Private Sub Worksheet_Change(ByVal Target As Excel.Range) Private Sub Worksheet_SelectionChange(ByVal Target As Range) I run some codes, either in UserForms or general procedures that make changes to this worksheet. Q. Is there a way to by-pass those two events somehow? As an example I have a uf that comes up if a cell is selected in that sheet. So I need those worksheet_Change events to work at that point. But then, the uf does some stuff like inputing ...

Attached Toolbars Macros
Excel 2003 I have a custom tool bar, this tool bar has several items, each item is pointing to a VBA code. This tool bar is attached to the worksheet. I've copied this spreadsheet to several computers. After I copied the spreadsheet I decided to rename the spreadsheet, after I renamed the spreadsheet the Toolbar Item's macros were still pointing to the old name, I reasigned each tool bar item to the current spreadsheet, saved the spreadsheet and everything was working on my computer, but when I re-copied the new spreadsheet to other computers and I clicked on the Toolbar Item...

encoding wmv file
hello I have a sample application developed in MFC dialog based project using directx sdk 9. the sample captures video from a webcam and saves it to a wmv file now i have to put that video into streaming server. i beleive that i will have to encode the wmv file using some codecs to put it into streaming server. i want to do the capturing and encoding simultaneously. below is a portion of my code to capture video // capture video pBuilder->RenderStream(&PIN_CATEGORY_CAPTURE, // Pin category &MEDIATYPE_Video, // Media type p...

VBA code to say Yes or No if any VBA code is present in ActiveWork
Using XL 2003 & 97 Would like hit Ctrl+Shift+V and have an answer either yes or no as to the presence of Any VBA code in the Active Workbook. I do know that about the VBA editor/Explorer or to press the Run Macro button and get a list from various sources . I would like to stay at the keyboard and process a series of macros including one to let me know if I even need to evoke the VBA explorer. TIA Dennis There is no bootstrap macro to tell you whether you have macros or not. If there were there would be no limit to virus writers. --- HTH, David McRitchie, Microsoft MVP - Excel ...

Run macro automatically.
How do I make a macro run automatically when a worksheet it is attached to is loaded? right click on the sheet tab>view code>left window worksheet>right window activate -- Don Guillett SalesAid Software donaldb@281.com "Excel macro" <Excel macro@discussions.microsoft.com> wrote in message news:DD7AF1E3-9263-4523-AC49-A43ABA1AB9D0@microsoft.com... > How do I make a macro run automatically when a worksheet it is attached to is > loaded? I am unable to find "activate " when I right click on worksheet. ( i assume that you are referring to the windo...

File location?
Where are the aspx files stored? http://site/subsite/list/defautl.aspx where would i find that? the reason i ask is when i go to export there are a couple of files that im told access denied. not sure why since im the admin on all levels. Thanks Justin Well, that really depends... mostly your stuff is stored in SQL, which means that its really data in a table cell. However, depending on whether a page has been customized or not it could be pointing to definition files that are stored on the Web Front End servers, and you really want to leave those alone. Furthermore, th...

How to Use One PST file on Two Computers?
Hello: I have a desktop machine with a pst file in my Outlook 2003. I would like to copy this pst file to my laptop. How do I synchronize the same file on 2 machines so I won't get duplicate e-mails? I use one premium Yahoo e-mail account and several free Yahoo accounts with YahooPOPs.. Thanks in advance, Spudy Hi Spudy, it is not possible by default to share PST files. A list of a list of third-party synctools are also on this site: http://www.slipstick.com/outlook/sync.htm On the Microsoft Office Marketplace site is a list of third-party messaging tools: http://office.microsoft.com...

Help with macro/and or formula?
Perhaps this is a silly question, but i just can't figure out how t format this worksheet. The problem is that a lot of the cells hav numbers in them with negative signs in the back instead of in the fron (ie. 23-) and i was wondering if anyone knew of a macro/formula i coul use to quickly fix this problem for all the cells. I would b extremely grateful. Thanks -- brefed1 ----------------------------------------------------------------------- brefed15's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=3557 View this thread: http://www.excelforum.com/showthre...

Payout reason codes
Can someone point me to where in the database the payout reason codes are stored? thanks, Store Ops Manager, Database, Reason Codes, Type = Payout "Jason" wrote: > Can someone point me to where in the database the payout reason codes are > stored? > > thanks, Thanks. What I meant (and asked poorly) was if I wanted to design a custom report to show that info where would I need to look? Thanks, "Wendy_I" wrote: > Store Ops Manager, Database, Reason Codes, Type = Payout > > > > "Jason" wrote: > > > Can someo...

File In Use
I am trying to open an excel program that is shared on a network drive. When I go to open it the following message box pops up.... File In Use name.xls is locked for editing by 'user name'. open by 'read only' or click 'notify' to open read-only and receive notification when the document is no longer in use. The user name that it is saying is me and I don't have the file open. Does anyone know why it is saying this or how to fix it? I guess it thinks I have the file open, maybe it didn't close right but I can't figure it out. Thanks Dave ma...

Importing a pst file in Outlook XP
My computer's configuration changed and I had to delete some hard disk partitions. After doing that, when I open Outlook it pops up a window saying "Unable to open your default e-mail folders. The file F:\{...}\outlook .pst could not be opened". Then I press OK and then a new pop-up says "Would you like to open your default File System folder instead?" If I press Yes, Outlook opens without (of course) the outlook.pst file. Also, I can't import my pst file neither I can Create a new one. If I press No, Outlook closes. Does anyone know how to open my pst fil...

Protected sheets and running macros
i have a sheet with a macro ran by a normal button at the top. Howeve when i protect the worksheet where ever i click on the sheet the macr executes. Can any one offer any advice on how to stop this? Thanks Robert -- Message posted from http://www.ExcelForum.com hi, i am not able to reproduce the problem, hence i may not be able t provide a panacea for that issue. here is what i suggest. i have a sheet that has a macro that is run when a control toolbo button (that is, not a form button) is clicked. this sheet is protected based on the user logged in. what i have don is to protect t...

Macro Freezes Reading Pane
I have a macro that Sends/Receives Tasks from Project Server into Outlook Tasks. Everything is working fine, except one weird thing that happens. I have the Timer set on the macro and it starts as soon as Outlook starts. The macro gets the tasks from ProjectServer every hour. As soon as the macro starts running the Reading pane freezes in the Inbox. If i stop the macro then Reading pane is back to normal. Can anyone please tell me if there is something I can do in VBA to fix this annoying issue. Thanks a lot ...

Macro to remove rows?
Hi, I receive thousands of rows of data from an extract that comes from a database. The data extract automatically generates page headers that need to be removed, and I would love to automate this process. The headers do have a pattern to them, but I'm not clever enough to figure out a good way to use that to write a macro. The first row of the header starts with hyphens ------------------------------- Then there's a variable number of rows of header data to delete followed by another row of hyphens ------------------------------- Then 2 additional rows that must be deleted. The nu...

Exporting to Word in a csv file
I am doing the above and leading zeros are being dropped...I need them in because they are account codes that I am uploading to my GL. Can anyone help? Brad I've run into leading zero problems before when exporting/importing. Try this--make sure your data items with leading zeros are "text" format, that should preserve the leading zeros. I made a test file, saved it as CSV, then pulled into Word (insert file), and the leading zeros were still there. But, if you open up the CSV file again in Excel, the leading zeros disappear... "Brad" <Brad@discussions.microso...

Avery Label codes not the same in Word 2007
I can't find the correct Avery codes in Word 2007. I recently switched over from Office 2003. Anyone have any ideas? Liz wrote: > I can't find the correct Avery codes in Word 2007. I recently > switched over from Office 2003. Anyone have any ideas? The Avery numbers are in alphabetical order, not numerical order; for example, 11111 would come before 2. Does that help you find what you're looking for? -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so...

Remoting and File Size Limit
Hello Group: I have been directed to ask this question in this group. If this is the incorrect forum: please let me know. We have a web-app that uses remoting to access some components. XML from the web page is sent to these components and a value is returned. We have noticed that on one server: this works great, but on two other servers, after the XML gets to be bigger than 4KB, the XML gets truncated and as a result: the process fails. We feel failrly confident this is some server issue / setting and not really a coding issue however are totally clueless on where to look to make ...

Calling on a macro within a macro!
Hey All!! Quick Question - How do you call up a macro within a current macro? I have one big macro and I need it to jump to several other macros when it runs! Does it matter where the other macros are stored or is it better to have them all in one module? Help appreciated Thnx! Hi Mellowe, '=============>> Public Sub Main() 'Your code Call One 'your code End Sub '<<============= '=============>> Public Sub One() MsgBox "Hi from One" End Sub '<<============= > Does it matter where the other macros are stored or ...