macro to move from directory to directory

I am writing/recording a macro to make changes in 64 different
spreadsheets in 64 different folders on a network. I am just learning
vba. I don't know how to tell Excel to move through the 64 folders,
test for the spreadsheet to be sure it's there, then make changes. Any
suggestions?
TIA
Dave

0
davegb (100)
1/23/2005 6:47:58 PM
excel 39879 articles. 2 followers. Follow

20 Replies
833 Views

Similar Articles

[PageSpeed] 58

I would use a worksheet to help out.

In A2:A65, I'd put the 64 folders to check.
In B1, I'd put the filename to look for.

Then something like this:


Option Explicit
Sub testme2()

    Dim myRng As Range
    Dim myCell As Range
    Dim myFileName As String
    Dim TestStr As String
    Dim tempWkbk As Workbook
    
    With Worksheets("sheet1")
        Set myRng = .Range("a2:A65")
        For Each myCell In myRng.Cells
            myFileName = myCell.Value
            If Right(myFileName, 1) <> "\" Then
                myFileName = myFileName & "\"
            End If
            myFileName = myFileName & .Range("b1").Value

            TestStr = ""
            On Error Resume Next
            TestStr = Dir(myFileName)
            On Error GoTo 0
            
            If TestStr = "" Then
                myCell.Offset(0, 2).Value = "Missing!"
            Else
                myCell.Offset(0, 2).ClearContents
                Set tempWkbk = Workbooks.Open(Filename:=myFileName)
                'do your work
                tempWkbk.Close savechanges:=True
            End If
        Next myCell
    End With
End Sub


davegb wrote:
> 
> I am writing/recording a macro to make changes in 64 different
> spreadsheets in 64 different folders on a network. I am just learning
> vba. I don't know how to tell Excel to move through the 64 folders,
> test for the spreadsheet to be sure it's there, then make changes. Any
> suggestions?
> TIA
> Dave

-- 

Dave Peterson
0
ec357201 (5290)
1/23/2005 7:24:37 PM
I assumed that the name of the workbook was the same for all the folders.  If
it's not, then you could put the individual names in B2:B65 and change this
line:

            myFileName = myFileName & .Range("b1").Value
to:

            myFileName = myFileName & mycell.offset(0,1).Value



Dave Peterson wrote:
> 
> I would use a worksheet to help out.
> 
> In A2:A65, I'd put the 64 folders to check.
> In B1, I'd put the filename to look for.
> 
> Then something like this:
> 
> Option Explicit
> Sub testme2()
> 
>     Dim myRng As Range
>     Dim myCell As Range
>     Dim myFileName As String
>     Dim TestStr As String
>     Dim tempWkbk As Workbook
> 
>     With Worksheets("sheet1")
>         Set myRng = .Range("a2:A65")
>         For Each myCell In myRng.Cells
>             myFileName = myCell.Value
>             If Right(myFileName, 1) <> "\" Then
>                 myFileName = myFileName & "\"
>             End If
>             myFileName = myFileName & .Range("b1").Value
> 
>             TestStr = ""
>             On Error Resume Next
>             TestStr = Dir(myFileName)
>             On Error GoTo 0
> 
>             If TestStr = "" Then
>                 myCell.Offset(0, 2).Value = "Missing!"
>             Else
>                 myCell.Offset(0, 2).ClearContents
>                 Set tempWkbk = Workbooks.Open(Filename:=myFileName)
>                 'do your work
>                 tempWkbk.Close savechanges:=True
>             End If
>         Next myCell
>     End With
> End Sub
> 
> davegb wrote:
> >
> > I am writing/recording a macro to make changes in 64 different
> > spreadsheets in 64 different folders on a network. I am just learning
> > vba. I don't know how to tell Excel to move through the 64 folders,
> > test for the spreadsheet to be sure it's there, then make changes. Any
> > suggestions?
> > TIA
> > Dave
> 
> --
> 
> Dave Peterson

-- 

Dave Peterson
0
ec357201 (5290)
1/23/2005 7:31:31 PM
Dave,
Thanks for all your help. I've copied the code for future use. The
macro approach was getting increasing complex as my client kept adding
things they wanted changed in these spreadsheets. I finally realized it
was easier to create a "base" file (like a template, sort of) and just
to a save as to each folder and then change a few text entrys.

0
davegb (100)
1/25/2005 3:00:38 PM
I've now created this macro and done some test runs. I can't get it to
find the files in the folders. I'm not even sure it's finding the
folders. It just places "Missing" in column c. How do I tell it where
the folders are? I did change the default location to save Excel files
into the first of the directoriew to see if I could get it to find
them. But I'd rather do it with a macro command than change the default
where Excel files are saved.
When I step through the macro, I get a message that "C:\" cannot be
found. So I'm guessing that the macro is looking in the root directory
rather than where the files are stored. 
Any ideas?
TIA

0
davegb (100)
2/2/2005 10:46:08 PM
The first code looked for the folder names in column A and the workbook names in
column B.

But read my follow up post if the names of the workbooks varied.

davegb wrote:
> 
> I've now created this macro and done some test runs. I can't get it to
> find the files in the folders. I'm not even sure it's finding the
> folders. It just places "Missing" in column c. How do I tell it where
> the folders are? I did change the default location to save Excel files
> into the first of the directoriew to see if I could get it to find
> them. But I'd rather do it with a macro command than change the default
> where Excel files are saved.
> When I step through the macro, I get a message that "C:\" cannot be
> found. So I'm guessing that the macro is looking in the root directory
> rather than where the files are stored.
> Any ideas?
> TIA

-- 

Dave Peterson
0
ec357201 (5290)
2/2/2005 11:10:42 PM
Thanks for your prompt reply!
In the test I did, all the filenames were the same. I decided to do it
that way at first, then add the complication later. So this was run
with all the file names the same. The workbook name was in B1.

0
davegb (100)
2/2/2005 11:17:55 PM
You put the common filename in B1.

You put the folders in A2:A65?

I'm guessing that the folder names weren't spelled correctly.  Or since all were
marked missing, maybe the filename wasn't spelled correctly.  (Did you include
the .xls?)



davegb wrote:
> 
> Thanks for your prompt reply!
> In the test I did, all the filenames were the same. I decided to do it
> that way at first, then add the complication later. So this was run
> with all the file names the same. The workbook name was in B1.

-- 

Dave Peterson
0
ec357201 (5290)
2/2/2005 11:43:17 PM
The filename, New Microsoft Excel Worksheet.xls is correct and in cell
b1
The directory names are in cells A2:A5 (decreased the number for test
purposes, changed in macro appropriately).
The folder names, for the test, are one, two, three, four. Spelled
correctly. I used names that are hard to misspell. 
Any other ideas?

0
davegb (100)
2/3/2005 2:49:51 PM
Here is the code as I have modified it for this test. The only changes
I made were to the range of cells and had it enter the number 55 into
cell A1 so I know the macro has opened the spreadsheet.

Sub MoveFolder2Folder()

   Dim myRng As Range
   Dim myCell As Range
   Dim myFileName As String
   Dim TestStr As String
   Dim tempWkbk As Workbook

   With Worksheets("sheet1")
       Set myRng = .Range("a2:A5")
       For Each myCell In myRng.Cells
           myFileName = myCell.Value
           If Right(myFileName, 1) <> "\" Then
               myFileName = myFileName & "\"
           End If
           myFileName = myFileName & .Range("b1").Value
           TestStr = ""
           On Error Resume Next
           TestStr = Dir(myFileName)
           On Error GoTo 0
           If TestStr = "" Then
               myCell.Offset(0, 2).Value = "Missing!"
           Else
               myCell.Offset(0, 2).ClearContents
               Set tempWkbk = Workbooks.Open(Filename:=myFileName)
               'do your work
               ActiveCell.FormulaR1C1 = "55"
               tempWkbk.Close savechanges:=True
           End If
       Next myCell
   End With
End Sub

I have stepped through the macro and the filename, in cell B1 is not
getting into the myFileName variable. The directory names, for the
test, are one, two, three and four. The first in the directory is
"four". myFileName = "four\" even after the reference to B1. It should
include the file name "New Microsoft Excel Spreadsheet.xls" but it
doesn't. What am I missing?

0
davegb (100)
2/3/2005 4:08:01 PM
This line:

           myFileName = myFileName & .Range("b1").Value

Picks up the value in B1.

Try replacing that one line with these 3.

           MsgBox .Range("b1").Value
           myFileName = myFileName & .Range("b1").Value
           MsgBox myFileName

It won't help the macro run any better, but you'll see what is actually in B1
and what myFileName is holding.

(I'm still guessing typos!)

And you did put your data on Sheet1???

If no, then change this line of code:

 With Worksheets("sheet1")

davegb wrote:
> 
> Here is the code as I have modified it for this test. The only changes
> I made were to the range of cells and had it enter the number 55 into
> cell A1 so I know the macro has opened the spreadsheet.
> 
> Sub MoveFolder2Folder()
> 
>    Dim myRng As Range
>    Dim myCell As Range
>    Dim myFileName As String
>    Dim TestStr As String
>    Dim tempWkbk As Workbook
> 
>    With Worksheets("sheet1")
>        Set myRng = .Range("a2:A5")
>        For Each myCell In myRng.Cells
>            myFileName = myCell.Value
>            If Right(myFileName, 1) <> "\" Then
>                myFileName = myFileName & "\"
>            End If
>            myFileName = myFileName & .Range("b1").Value
>            TestStr = ""
>            On Error Resume Next
>            TestStr = Dir(myFileName)
>            On Error GoTo 0
>            If TestStr = "" Then
>                myCell.Offset(0, 2).Value = "Missing!"
>            Else
>                myCell.Offset(0, 2).ClearContents
>                Set tempWkbk = Workbooks.Open(Filename:=myFileName)
>                'do your work
>                ActiveCell.FormulaR1C1 = "55"
>                tempWkbk.Close savechanges:=True
>            End If
>        Next myCell
>    End With
> End Sub
> 
> I have stepped through the macro and the filename, in cell B1 is not
> getting into the myFileName variable. The directory names, for the
> test, are one, two, three and four. The first in the directory is
> "four". myFileName = "four\" even after the reference to B1. It should
> include the file name "New Microsoft Excel Spreadsheet.xls" but it
> doesn't. What am I missing?

-- 

Dave Peterson
0
ec357201 (5290)
2/3/2005 10:51:19 PM
Thanks for your patience.
After replacing the line with the 3 new lines, message boxes appeared,
first a blank, then one with the first directory name in it and a
backslash (no filename), then a blank, then the next directory with
backslash, then a blank, etc.

Also, I tried putting in the file name (in quotes) in the macro in
place of the .Range("b1").Value, and myFileName picked it up, but still
said the files were missing. Does that tell you anyting?

I also changed the name of the files and B1 to "test.xls" to be sure
there were no spaces or unseen characters in them. Still the same
result.

0
davegb (100)
2/3/2005 11:36:45 PM
If this line:

 MsgBox .Range("b1").Value

resulted in a blank message box, then you don't have the value in B1 (maybe
column B is hidden and you have it in column C???---or maybe row 1 is hidden and
you're in row 2????)

Or maybe you don't have it on sheet1.



davegb wrote:
> 
> Thanks for your patience.
> After replacing the line with the 3 new lines, message boxes appeared,
> first a blank, then one with the first directory name in it and a
> backslash (no filename), then a blank, then the next directory with
> backslash, then a blank, etc.
> 
> Also, I tried putting in the file name (in quotes) in the macro in
> place of the .Range("b1").Value, and myFileName picked it up, but still
> said the files were missing. Does that tell you anyting?
> 
> I also changed the name of the files and B1 to "test.xls" to be sure
> there were no spaces or unseen characters in them. Still the same
> result.

-- 

Dave Peterson
0
ec357201 (5290)
2/4/2005 1:22:42 AM
This is gonna be a slap the forehead when you find the solution!

davegb wrote:
> 
> Thanks for your patience.
> After replacing the line with the 3 new lines, message boxes appeared,
> first a blank, then one with the first directory name in it and a
> backslash (no filename), then a blank, then the next directory with
> backslash, then a blank, etc.
> 
> Also, I tried putting in the file name (in quotes) in the macro in
> place of the .Range("b1").Value, and myFileName picked it up, but still
> said the files were missing. Does that tell you anyting?
> 
> I also changed the name of the files and B1 to "test.xls" to be sure
> there were no spaces or unseen characters in them. Still the same
> result.

-- 

Dave Peterson
0
ec357201 (5290)
2/4/2005 1:23:20 AM
Found part of the problem, and it is a slap in the forehead! All this
time I had the filename in cell b2! Duh! But now that I've changed the
macro to look in B2, it gets the right name, but still can't find any
of the files. Any ideas on what to look for next?
Thanks again!

0
davegb (100)
2/4/2005 2:40:35 PM
I still gotta believe that it's a typo problem.

After this line:

myFileName = myFileName & .Range("b2").Value
put these lines:

debug.print myfilename
exit sub

Then hit ctrl-g to see the immediate window.

You'll see the filename that is being searched for.
highlight it and copy it.
windows start button|Run
paste it into that dialog box.

If this opens the file correctly, then there's a problem with the macro.  If it
doesn't, then there's a problem with your typing.

If it fails, paste that result in the followup post.  I'd like to see what that
string looks like.

(Remember to remove these debugging lines (msgbox's, debug.prints, and exit sub)
when you're ready.)

davegb wrote:
> 
> Found part of the problem, and it is a slap in the forehead! All this
> time I had the filename in cell b2! Duh! But now that I've changed the
> macro to look in B2, it gets the right name, but still can't find any
> of the files. Any ideas on what to look for next?
> Thanks again!

-- 

Dave Peterson
0
ec357201 (5290)
2/4/2005 8:39:00 PM
Did as you suggested. It returned "four\test.xls". Didn't have to run
it, I know that it can't be found. It's not returning the full path to
these folders and files, only the local directory name and the file
name. How do I tell XL where these folders are?

0
davegb (100)
2/4/2005 9:04:03 PM
Found it! Remember I asked you earlier how XL could find these
directories and files? The problem was the I never gave the full
pathname to XL. I added a statement to make strPath =
ActiveWorkbook.path, then added this and a "\" to the myFileName
variable. Macro ran like a charm!
Thanks for all your help, Dave! Now on to creating a macro to put the
spreadsheet names in a column because they will not all be the same,
but a variant on the folder names. Then I can use the list for another
macro will use it to open and modify all the files for the 64 counties!

0
davegb (100)
2/4/2005 9:20:32 PM
make sure that column A includes the complete path:

c:\four\
or
c:\my folder\my documents\my sub folder\four

====

Weird guess follows--probably not close to being the problem...

If you select one of those cells, what do you see in the cell?
What do you see in the formulabar for that cell?

If it's not the same, maybe someone included portions of the path in the
numberformat for that cell.

If that's the case, you could use either (not both) of these fixes:
Format the cells as General and fix the values in all those cells.

or...

Change this line from:
myFileName = myCell.Value
to
myFileName = myCell.Text







davegb wrote:
> 
> Did as you suggested. It returned "four\test.xls". Didn't have to run
> it, I know that it can't be found. It's not returning the full path to
> these folders and files, only the local directory name and the file
> name. How do I tell XL where these folders are?

-- 

Dave Peterson
0
ec357201 (5290)
2/4/2005 9:21:06 PM
Whew!

Glad you found the solution.

davegb wrote:
> 
> Found it! Remember I asked you earlier how XL could find these
> directories and files? The problem was the I never gave the full
> pathname to XL. I added a statement to make strPath =
> ActiveWorkbook.path, then added this and a "\" to the myFileName
> variable. Macro ran like a charm!
> Thanks for all your help, Dave! Now on to creating a macro to put the
> spreadsheet names in a column because they will not all be the same,
> but a variant on the folder names. Then I can use the list for another
> macro will use it to open and modify all the files for the 64 counties!

-- 

Dave Peterson
0
ec357201 (5290)
2/4/2005 9:58:34 PM
Thanks, Dave!

0
davegb (100)
2/6/2005 8:01:21 PM
Reply:

Similar Artilces:

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

move mailbox across AG
Hi all, Having a mixed Exchange environment, with E2003 SP1 and E55 SP4. I also have 2 Administrative Groups (A and B) set up, with at least 2 x E2003 servers in each AG. I was able to do a move mailbox from A to B, with no problem. I'm connected to the ESM on a E2003 server in A, and I can see that the user properties has updated with new home server, and ESM also shows the moved mailbox inside the destination E2003 server in B. However, I just couldn't move any mailbox from B to A, using the same console (ie. from a E2003 server in A). An error hit when during the move: Event ID: ...

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

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

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

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

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

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

Error when moving mailbox
I received this error when I am move some mailboxes, not all. I checked all the permissions are good. Can someone help please? <item adsPath="LDAP://xxx/CN=xxx,OU=xxx,OU=Users and Groups,DC=xxx,DC=ad" class="user"> <progress code="21" milliseconds="23937">Moving messages.</progress> - <summary isWarning="false" errorCode="0xc1050301"> An unexpected, unknown error has occurred. MAPI or an unspecified service provider. ID no: 80040301-0000-00000000 On Thu, 9 Feb 2006 16:16:30 -0800, Speedyturtle <S...

moving cell after calculation
Hello all, I am compiling a hours worked sheet. I have assigned a button whic adds 7 to the active cell, what do I have to do to get the active cel to move one cell down in the same column so I do not have to manuall move the active cell down. thanks for your help -- Message posted from http://www.ExcelForum.com Greg, Add the following line at the end of your macro code: ActiveCell.Offset(1,0).Select HTH, Nikos "greg7468 >" <<greg7468.17mj5t@excelforum-nospam.com> wrote in message news:greg7468.17mj5t@excelforum-nospam.com... > Hello all, > I am compiling a h...

Move Exchange .5 to New NT 4.0 Server
HI, Can some one guide to move exchange server to new server please. Backup the DS and IS Take server offline... Build new server with same name. Install same Windows Service Pack Install Exchange - New Org and Site (Same as last install) Install same Exchange Service Pack Run Optimizer Install IMC if the old box had one. Stop DS and IS Clear all DSADATA folders and MDBDATA folders. Restore DS and IS -- Hope that helps, Dan Townsend This posting is provided "AS IS" with no warranties, and confers no rights. Please do not send email to this address, post a reply to this news...

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

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

shortcut keys to macros
Hi, Is it at all possible to assign shortcut keys to macros in Outlook? Thx, Hans ...

Business Management Error Move CRM 4.0 Database to Different Machi
Hi, I have backed up a CRM 4.0 _MSCRM and MSCRM_Config database from one machine and restored both on another machine ( Which had been useing a test database). After restoring both databases on the new host I used the Deployment Manger to import the restored database. After completing the import when I attempt to open CRM I get an error message saying " Business Management Error The user ID associated the current record is not valid" From the server where I'm logged an as Administrator On client PC I get the following. Server Error in '/...

help Unable to record Macro !!!!!!!
I want to record a macro in excel.But as soon as I click record Macro it says "unable to record" macro. Got no help in excel help.I do this same thing in word and it's working. Please help It's urgent for me !!!1 Have a look here http://groups.google.com/groups?as_epq=unable%20to%20record&as_ugroup=microsoft.public.excel.* -- Don Guillett SalesAid Software donaldb@281.com "ash" <anonymous@discussions.microsoft.com> wrote in message news:3e0b01c42ae5$45333e00$a401280a@phx.gbl... > I want to record a macro in excel.But as soon as I click > record...

Macro that password protects a sheet
I am attempting to create a macro that can open a protected sheet, change something, and then protect it again. I continue to have an issue with the macro not entering the password. Is this possible to do/fix? Thanks, Ryan ..open password="mypassword" -- Don Guillett SalesAid Software donaldb@281.com "Ryan" <Ryan@discussions.microsoft.com> wrote in message news:D4780ED8-CA1D-4284-97BC-3576160D998E@microsoft.com... > I am attempting to create a macro that can open a protected sheet, change > something, and then protect it again. I continue to have an iss...

Footer Macro?
Hi Months ago I read a Public Sub Macro that read the selection of a drop down list in a combo box and placed it in the center Footer at the same time it also placed the date in the right Footer and tme in the left footer. I have searched most of the regular sites including this one and cannot find it anywhere --- Can anyone help with my search. Any help much appreciated Cheers ---- Mully ...

Keyboard Shortcut in Macro
Hi all i'v created macro with Keyboard Shortcut Ctrl+b . now i want to change it to Ctrl+z how can i do it . regards Tools-->Macro-->Macros. Select (don't open!) your macro, and hit the Options button. :) ************ Hope it helps! Anne Troy www.OfficeArticles.com "osaka78" <osaka78@discussions.microsoft.com> wrote in message news:1721A458-212D-4446-8209-494A459EE428@microsoft.com... > Hi all > i'v created macro with Keyboard Shortcut Ctrl+b . now i want to change it > to > Ctrl+z > how can i do it . > > regards THE MACRO IS NO...

Macros have been disabled but there is no macro
when I open a specific doc the info bar at the top says "Macros have been disabled", but when I hit Alt+F11 I can't find any VB or a module to remove. Why is it telling me about macros? Other docs don't give me this prompt. I thought I might have to enable macros to see the code. When I enabled macro, it said "do you want to save changes to this doc?" it flickered and came back as if immediately reopened. Any ideas? I could copy and paste the text into a new doc but I'd be interested to be able to strip off this problem. The doc is an internal IT ...

Run multiple Macros or macros from within other macros ?
I would like to run multiple macros at startup. What code should be used in the Private Sub Application_Startup command in the ThisOutlookSession area ? If the names of my macros were below what would the code to look like ? Macro1 Macro2 Macro3 I have looked at the samples from previous posts and cannot determine how to make them apply specifically to my needs. In Excel you can use the Run "Macro1" line and it would run that macro. Run does not work in Outlook I suppose because I kept getting an error. **** Also - What code is needed to execute a macro from w...

Move data from column to rows HELP!!!
Hi thanks for taking the time to look at my problem, currently i have column that has thousands of rows of information in it, it looks lik this A 40432 432654 3432 532543 32432 523 53425 532532 532 523 532 111 222 333 666 numbers that go on into mabye the 5000-6000 range what i need to do is have that data moved So it looks like this A | B | C 40432 | 32432 | 532 432654 | 523 | 523 3432 | 52432 | 111 532543 | 532532 | 222 So on and so on, so instead of 1 column with 6000 lines it ...

Startup macro
Is it possible for automatic start of macro in moment when excel file is opening. I mean when I open excel file specific macro will be immediately automatic started. Zeno option explicit sub auto_Open() call yourspecificmacronamehere end sub Zeno wrote: > > Is it possible for automatic start of macro in moment when excel file is > opening. > I mean when I open excel file specific macro will be immediately automatic > started. > > Zeno -- Dave Peterson ...

Macro Question #8
Hi: I have a group of several files with a simple macro that automatically goes to a specific worksheet at the time the file is opened. The code is as follows: Private Sub Workbook_Open() Worksheets ("TITLE").Select Range ("a1").Select End Sub The macro works properly when a single file is opened, but when I try to open several of the files at the same time I get the following error message: Run Time Error 1004 Select method of Worksheet Class Failed All of the files do open, but the macro appears to run on only the first file selected. All of the other files open ...