Macro to open all files in one particular directory
I would like to be able to have a macro that would automatically open ALL
the files in one particular directory.
Say I have various directories, each with 10 files of different names: (the
number of files in each directory can vary)
In my file named OPENFILES.xls, in cell A1 of sheet1, I would like to input
the directory name (say 200411), and then run a macro that would open each
file of that particular directory, regardless of their name. I tried to
record a macro, but it listed the individual files to open,. The problem is
that the n...This one is tricky....Macro to save file as cell value x in direct
Two cells A1 & B2
I am trying to create a Macro to attach to a button to Save an .xls as
"A1".xls in directory R:/SALES/Team 318/"B2"
instead of typing it in all of the time....
Any helpers? Past attempts at this have failed.....the winner will get a big
Try something like:
Dim mypath As String
Dim sfile As Range, sdir As Range
mypath = "R:\SALES\Team 318\"
Set sfile = Sheets("Sheet1").Range("A1")
Set sdir = Sheets("Sheet1").Range("B2")
ThisWorkbook.SaveAs Filen...Macro entering data into a protected Cell??
I'm trying to create a time sheet and I want to have a macro insert the
current time into a protected cell (to stop people editing the time
Is this possible?? Any tips/hints
See your other thread
Regards Ron de Bruin
<email@example.com> wrote in message news:firstname.lastname@example.org...
> I'm trying to create a time sheet and I want to have a macro insert the
> current time into a protected cell (to stop people editing the time
> Is this possible?? Any tips/hints
...Macro-Return Blank Cell
I am creating an Invoice by the help of macro where I want to clear all the
data from unlock cell after entering the buttom named NEXT or OK.So I could
enter fresh data in the same unlock cell.
How it possible?
Dim cel As Range, r As Range
For Each r In ActiveSheet.UsedRange
If r.Locked Then
If cel Is Nothing Then
Set cel = r
Set cel = Union(cel, r)
If cel Is Nothing Then
Gary''s Student - gsnu200909
...Redefining a table range with a macro
I need help creating code to redefine a table within a macro. I used the
macro recorder to creata a table with the same name but to point to another
ActiveWorkbook.Names.Add Name:="Table1", RefersToR1C1:= _
How do I make this dynamic, so the starting point, #of rows and # of columns
are defined by variables?
Help is much appreciated.
On May 21, 4:57=A0pm, OMER <O...@discussions.microsoft.com> wrote:
> ...macros for calculating data after inserting row #2
I am working on a spreadsheet where I search through row by row, an
if the data in the Column B of that particular row is equivalent to th
data in the Column B of another row is the same, I add the data in th
Column W of the rows together. Then, I divide the number by the coun
of how many rows are the same. I found a way to do something simila
to this by using =SUM(w3:w9)/rows(w3:w9), but that only works when
insert rows within the row ranges, assuming that the data in Column
of rows 3 through 9 are the same. If I insert a row after row 9 tha
has the same value as the others(column ...Macro help
is there a way to copy the name a user inputs (say in cell ref A1) and
create a new worksheet within my current workbook with this 'name' using a
the user inputs Bloggs,Joe into cell ref A1, and once the macro is selected
a new worksheet is created with the 'tab' now changed to Bloggs,Joe - instead
of Sheet1, Sheet2 etc etc
I'm a novice -so sorry if this is simple
Dim x As Worksheet
Set x = ActiveSheet
ActiveSheet.Name = x.Range("A1")
...Macro to insert blank lines
I wonder if anyone already has a macro for the following operation I
perform quite often please? I insert blank lines in a long table
whenever a particular column changes. A typical example is in a list
containing a Year column, sorted by Year. It improves readability to
add a blank line between the 1972 and 1973 sections, 1973 and
Terry, West Sussex, UK
For i = cells(rows.count,"a").End(xlUp).Row To 2 Step -1
If Cells(i, 1).Value <> Cells(i - 1, 1).Value Then
Don Gui...How do I create Macro Button using Word 2003
In a nut shell I have got an exam coming up but never done Macros as I was
ill at the time and we have to edit a text using macro have done that in
practice, but then we have to create a button using macro when I attempt it I
get invalid name procedure box on my screen.
You have posted in an end user newsgroup. You'll have more luck getting the
answer you need if you post to one of the microsoft.public.word.vba
hierarchy of NGs. In the Microsoft Communities portal from which you're
posting, look for the Word discussion group called "Programming."
Suzann...Macro that concatenates content from cells if given keyword is found
Hello guys !
Here is what i want from a macro
In cells from B column i have from time to time a keyword . The macro
should find that keyword , to concatenate text from that cell with the
text from coresponding cell in C column and put the result in D column
beginning with the first cell . Here is an example :
Keyword = "mother"
B1 = mother C1 = and
B4 = daddy C4 = uncle
B6 = mother C6 = goes
B8 = mother C8 = is
B10 = sister C10= and
B20 = mother C20 = was
The result should be :
D1 = mother and
D2 = Mother goes
D3 = mother is
D4 = mother was
...can't change or add a macro
When I change anything (even the slightest change) in any macro in any of
the modules of Normal or when I add a new macro, next time I can't open
Word. Then I have to delete normal.dot and put in a copy of the normal.dot
as it was before I made a change. Very annoying and I have no idea what
causes this phenomenon. What causes this problem and how can I solve it
(once and for all)?
I am looking forward to your advice.
It is possible that your default normal.dot is corrupt....Updating Charts with Macro
I have set up my charts so that i can update them automatically by putting
the appropriate data in the fields. I would now like to be able to update
them using a macro, but cant seem to get it to automatically go to the next
blank cell to put in the date, infor etc. Any help would be greatly
appreciated..Thank you in advance
You haven't really given enough information to describe your requirement.
You could use dynamic ranges, with offset, index, or indirect worksheet
functions, and bypass the macros, too. See the few examples and many
http://www.geocitie...Running an Excel Macro from VC++
I use Excel Automation from VC++. I would like to run a
macro already stored in Excel on the workbook that I just
created. I was thinking that _Application::Run() would
do it but it doesnt' seem to find my macro.
The macro is stored under the name PERSO.XLS!Macro1. Run
doesn't seem to find it. Even if I user Macro1 as an
argument, I still can't run this macro.
Any ideas why ?
...Macro for Entering Data and Time in Tasks Notes
I have a user that uses the notes section in tasks as a journal of
activities for that task. Is there a shortcut or macro to quickly
insert the date and time in that field? Thanks for any tips.
> I have a user that uses the notes section in tasks as a journal of
> activities for that task. Is there a shortcut or macro to quickly
> insert the date and time in that field? Thanks for any tips.
Check out http://www.sperrysoftware.com/Outlook/Insert-Date-Time.asp
Note - posting your valid e-mail address in a newsgroup post, or in your
news account sett...Macro and Scheduled Task Prompt
I have created a macro that deletes 2 tables and replaces both tables using a build table query. I have used the SetWarning action (No) before and after each delete or build. I am using the macro in a sheduled task.When the scheduled task statrts, everything appears fine, but then this prompt appears:Table 'TempMSysAccessObjects' already existsIf I click on the OK prompt, the process continues.Any ideas where this prompt is coming from and how to get rid of it? Thanks,Zoe...ActiveCell.Offset for event macro
I need to move from the active cell in any row to the cell in column 6 of
the same row.
I know how to use ActiveCell.Offset to move a fixed number of rows and
columns. But I can't figure out how to handle a relative row and absolute
What I need is... ActiveCell.Offset(0,"however many cells there are between
the column I'm in and column 6)
Do I need to create a variable to calculate the number of cells, or is there
a simpler way?
ActiveCell.Offset(0,6 - ActiveCell.Column) ActiveCell.Offset(0,6 - ActiveCell.Column) activesheet.cell...Macro to Protect workbook using a password #2
I know this would be a little unorthodox, but I currently have a macro that
will unprotect a workbook including a password. The line is as follows:
I also want a macro that will do just the opposite, including the password.
Is this possible? I've tried the following with no luck.
ActiveWorkbook.Protect (password), Structure:=True, Windows:=True
You got two replies when to your identical post on Tuesday. If they
weren't suitable, please explain why not.
If you didn't see them, you can always see your posts and any
replies using the Go...macros are disabled message but macro security is low
I just installed Office 2003 and am trying to record/run macros in an Excel
worksheet. I can record a macro, but when I open Tools/Macro/Macros..., the
Edit, Create, Delete, & Options buttons are grayed out. The Run and Step Into
buttons are active, but when either is clicked, a message "Macros are
disabled because the security level is set to high......" is displayed. The
secruity level is NOT set to high, however. I have tried every setting from
high to low, with no effect on the error message. Any help would be
appreciated. This is the first time I have tried to us...show warning when a calculated total<0
How can I detect the condition that occurs when a calculated field becones
negative? I would like to issue a warning message at that time.
That's enough information to give a specific solution...
Are you talking about a form, or a query, or a report?
What's the calculation?
Describe the value/s that constitute the calculation.
Please... more info...
Essentially though... what event/s would effect/change that calculation
Use those events to trigger an evaluation of the new value, and respond
...Macro Editor disabled
I created a macro to delete attachments on my laptop.
I also had rules referring to scripts.
Coming back to the office and logging on to the network I got a question
(kind of like) whether the SERVER or the CLIENT should have priority to run
rules. I think I selected CLIENT. However, it now appears that the vba
project is not available anymore and even worse, the macro editor is
disabled. I checked if vba was disabled under Disabled-Items list but it
doesn't show up.
Any suggestions would be appriciated. Thanks
In the mean time I found out that the problem has to do with...Macro to open another user's Inbox
I'm trying to find code to create a macro to open another user's mailbox
which I have access to. Please can you help?
The easiest and most complete way would be to add that mailbox to your
Outlook profile so it gets opened as soon as you open Outlook. That's a
If you just want to get a specific default folder open you should look at
the Object Browser help on NameSpace.GetSharedDefaultFolder().
[MVP - Outlook]
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminde...German government warns against using MS Explorer
Now this must be the news of 2010
After nearly 10 years of unlimited patches, hotfixes and service Packs,
IE is still a weak link in recent attacks on Google's systems. Either
M$ is now threatened by Googles rise to prominence or IE is completely
rubbish. Either way we should start taking instructions from the German
government if this article is anything to go by.
Is google's search engine more powerful than M$ Bing?
> Now this must be the news of 2010
and 2011....and 2012....
IE problem...Macro: Find matching DATA, copy correspondently values into another list
Okey guys - please advise me on this.
(There was unfortunately no quick response to my latest problem - and
I begun to swim...
However - that brought me out on deep VBA-water...again - and now need
a life buoy (metaphorical spoken)).
The core of my macro problem is to look for all the values in column A
(Range A5:A??) in Sheet "BOARD" (not bored!!!) that match values in
another list placed in column A in sheet "LIST".
When finding the match I will copy correspondent celle.value in column
D / sheet "BOARD" into column B in sheet "LIST" - this w...Excel not warning if another user has the workbook open
Normally Excel will warn users on my network if another user has already
opened the workbook that they are trying to open.
There are two or three workbooks that Excel stopped warning the user's about
other users having them opened.
I have checked "Read Only Recommended" under Tools -> Options -> Security
Tab, which has solved the problem, ie users
once again receive the warning if someone else has already opened the file
however they are now also warned when opening the
file that they should preferably open the file as Read Only.
How do I configure these wo...Macro recorder
My macro recorder toolbar has disappeared? Not the VB
toolbar. I select record macro from the tools menu and the
recorder toolbar no longer appears although it is
recording. I like having this visible just for a reminder.
Try clicking with your right mouse-button on a toolbar or in the toolbar
area. That will bring up a list of all the toolbars. The one you're looking
for is called "stop recording," and if it doesn't have a checkmark next to
it, it won't show. You can click it in the list to place a checkmark and
make it visible.