Using a macro to edit a macro
I want to create a macro that will open up the excel vb/macro editor
and simply edit existing subs/macros with some fairly sophisticated
search and replaces. Note: the macro actions I intend to create are
editting existing macros, not worksheet/book interactions.
I have taken the nessacary steps of:
-creating unique break points (commented out sections) to find where
to insert the new code snipits
-created several refference variables that can be easily replaced in a
search and replace (I was thinking about using a promt box or actual
worsheet refference cel...Why is this PageSetup Macro So Slow?
Below is a page setup macro that runs real fast on my Excel2000 WinXP Pro
Desktop but real slow on Excel2000 WinXP Home Laptop.
I put msgboxes in to see what was slowing this macro up and the .TopMargin,
..BottomMargin, .Orientation and .PrintHeadings seemed to be taking a lot of time
Any suggestions on how to speed this code up?
.PrintTitleRows = "$1:$1"
.RightHeader = "&F &D &T &P/&N"
.TopMargin = Application.InchesToPoints(0.75)
.BottomMar...Macro to change position of chart labels on line chart
I have quite a trickly problem to solve and I would appreciate any
I have a dashboard page in a worksheet which shows financial KPIs
(i.e. sales) as forecast this year versus last year. There are a
number of line charts on the dashboard showing the differing
forecasts; the user of the dashboard can choose a business unit to
What I would like to be able to do is to have the chart labels for
these charts automatically change their aligmnent so that they display
properly. I have set the chart labels to display "Above" for the new
forecast and "Bel...Undo Posting to AP
Is there a procedure to undo a posting to AP. If not how can I revers the
About the only thing you can do is pull up the AP transaction and void it.
It'll reverse out the GL entry it creates for you.
"Vic Abrahamian" <VicAbrahamian@discussions.microsoft.com> wrote in message
> Is there a procedure to undo a posting to AP. If not how can I revers the
I have a user who inadvertently saved his workbook after deleting a
worksheet. I was wondering if there was a way to restore his file to
the previous version when he last saved his file.
I know there exists the backup copy function, but I am still curious to
know if there is a way to backup in the file modification history after
a save. (and a bad modification).
louisp's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=25880
View this thread: htt...Run a macro when cell value changes
I have a macro that I would like to run, onlly when a particular cel
value reaches a pre-defined value.
I really do not know how to do this - I have looked on help features
but to no avail. any ideas
Message posted from http://www.ExcelForum.com
right click sheet tab>view code>copy/paste this>modify to suit>save
Now when cell c1 calculates to >32 your macro will fire
Private Sub Worksheet_Calculate()
If Range("c1") > 32 Then call yourmacro ' MsgBox "Hi"
"Emea training >&quo...Lookup Formulas in macros
I am trying to create a macro with a simple lookup function and copy. This
part is fine, however the file I will be looking up with be changing every
week - so I have added some variables.
I was thinking the spreadsheet directory and name could be typed into A10
and B10 of the sheet the data with be imported into "book2.xls" but am
having difficultly with related this to the formula...any help appreciated.
See attempt below:
Dim Importdir, Importfile
Importdir = Range("a10")
Importfile = Range("b10")
...Run macro from shape when runnig macro in Excel 2007
I=B4m recording a macro that tries to run a macro from a shape, but it
doesn=B4t work in Excel 2007. I don=B4t know if this is a problem of this
version because I could do it in 2003.
Make sure the macro you have assigned to the shape is a public sub in a
' Picture1_Click Macro
' Keyboard Shortcut: Ctrl+e
ActiveCell.FormulaR1C1 = "1"
Gary''s Student ...Macros #46
How can I create a macro that will print an entire column of numbers that are
hyperlinked to a PDF. I want all the PDFs to print.
Col 1 Col 2 (hyperlinked to PDFs)
...set unicode in macro
I wrote a macro -> xla.
it returns manipulated and translated strings.
after passing to win7 i get the output in wrong language code, probably
how can i assign a unoicode string into a varialble?
thanks in advance
Here is one way:
Dim S1 As String
Dim S2() As Byte
Dim L As Long
S1 = "Hello World"
S2 = StrConv(S1, vbUnicode)
' byte array in the immedate window:
For L = LBound(S2) To UBound(S2)
Debug.Print L, S2(L), Chr(S2(L))
S1 = StrConv(S2, vbFromUnicode)
End ...Macro required to copy -past data to first empty row
I am in need of such a macro or code by which I can copy & paste data
from a particular row to first empty row of given row range.
Or if you want to find the row number of the last cell with data in a range see
Regards Ron de Bruin
"Vikky" <firstname.lastname@example.org> wrote in message news:email@example.com...
> Hi Expert,
> I am in need of such a macro or code by ...Undo a catlogue merge?
I am making a booklet and was playing with the catalogue merge thing. I've
decided not to do what i need to do that way but now whenever I open that
file it keeps asking me about merging that file. How do i make it stop doing
that? It took me a long time to get the master pages set up the way I want
them and get some of the stuff placed right.
Can somebody help this noobie?
Open your document, tell it to open without the data source. Tools - Mail
and Catalog Merge - Cancel Merge.
MVP Microsoft [Publisher]
"Annie" <Annie@discussions.microsof...Adding Outlook signature to email created by macro
I have a macro in Excel 2003 that creates an email.
How do I add the default Outlook signature to this email through the macro?
This should help
> I have a macro in Excel 2003 that creates an email.
> How do I add the default Outlook signature to this email through the macro?
Thanks Barb, I'll take a look at that
"Barb Reinhardt" wrote:
> This should help
> h...dynamic range selection with a macro
I'm trying to convert a CSV file into something I can use in a database. The
report comes broken into sections. Each section has header data that applies
to all the records beneath it, but is not included in those records. I need
to get certain values from the headers copied into the records directly
beneath. There's no set number of records in any one section, so the macro
needs to select its ranges dynamically.
Here's the setup and the key strokes I used to record a macro:
C1 has the first header, C10 has the second, C25 has the third, and so on.
Cells C2:C9 and C11:C...how can undo my preset first line indent on just the first paragra
how can undo my preset first line indent on just the first paragraph. i need
to have all subsequent paras indented. in my previous version of word when i
set this in 'special' indent, i could easily undo that on any paragraph by
using backspace. i am using word 2007.
Open your normal.dotx template from within Word (using the Open
command in the Office button), select the paragraph mark in the
otherwise blank typing area (Show Non-Printing Characters: Ctrl-
Shift-8), and apply the style Normal. Save the template.
The next time you make a new document, the cursor will be at...Virtual basic and macros
Operating System: Mac OS X 10.4 (Tiger)
I need to use virtual basic in excel for macintosh and it is missing in office 2008, so I am stuck with Office 2004. Now it is getting harder and harder to open files that customers send from office 2008. Will there be a new version of Office with support for virtual basic soon? Or, is it possible to have both office 2008 and 2004 on the same computer. I can't run windows on it.
Yes, Office 2004 & 2008 can coexist harmoniously on the same system. In
fact, you can run apps of both suite simultaneously & toggle ...Macro question #8
I want a macro to select a row (or cell in a particular row) on a worksheet
that corresponds with a value in a cell eg.
Cell shows value 5. Macro selects row 5 on another sheet
Cell shows value 5. Macro selects cell at intersection of row 5 and a
specific column (say column 2 ?) on another sheet
What do I need to include in my macro to do this?
Can anyone help ?
One way to select the row:
Dim myRng As Range
Dim otherWks As Worksheet
Set otherWks = Worksheets("sheet2")
Set myRng = Nothing
On ...Transferring Macros
I was wondering if there was an easy way to transfer a
bunch of macros to 5 other computers? Any help would be
Save a file with the macro's as a Add-in and distribute that one
How to Create an Add-in File in Microsoft Excel 97
Or import the module's (or copy the macro's) in the personal.xls file on each machine
Regards Ron de Bruin
"Mike" <firstname.lastname@example.org> wrote in message news:aace01c47963$57d3d480$a401280a@p...Running Macros w/vba
How can one run a macro in an excel file using automation...?
not sure for what you're asking but a macro introduction can be found
alien2_51" <dan.billow"at wrote:
> How can one run a macro in an excel file using automation...?
I'm populating data inside an Excel spreadsheet from within a DTS package
once the data is there I need run a Macro whcih outputs the data contained
in each worksheet to an XML file which I then need to validate against an
XSD... I never ha...undo a macro
Hello. I am trying to figure out if the condition of a worksheet or workbook
can be captured prior to running a macro so that the results of the macro can
be undone by using the the undo button.
Microsoft MVP - Excel
"Mike Archer" <MikeArcher@discussions.microsoft.com> wrote in message
> Hello. I am trying to figure out if the condition of a worksheet or
> can ...Macro to move to next column
I have a macro that is used to pull data from a data collection device
(winwedge). It is pulling three fields. It is a huge amount of data that
will fill all 65536 rows within an hour. I would like to make it jump to the
next set of columns when it reaches this point. Any help is greatly
You would get better answers if you post your code....
Anyway, you could use something like
If lngRow = 65000 Then
CurCol = CurCol + 3
lngRow = 1
somewhere within your code.
MS Excel MVP
"iblonger" <iblonger@discussio...VBA- Undo?
Is there no Application.Undo in PPT? If not, has anyone had success
using another strategy in VBA for reversing the last action a user did
in a slide edit?
You can call on the Undo button using the following code:
PowerShow - View multiple PowerPoint slide shows simultaneously
"Mel" <email@example.com> wrote in message
> I...Interrupt running macro?
In the VB Editor, when I'm testing a macro, I can press the BREAK key to
interrupt and stop the macro. Is there a way to interrupt a macro while it's
running from an add-in? (I tried pressing the BREAK key, but that didn't
work. Incidentally, I tried Ctrl+C, from DOS days, but that didn't work
I found this example: http://www.pptfaq.com/FAQ00972.htm, but I'm not sure
how to get my event handler to send a message back to the active/running
macro and tell it to Exit Sub.
If there is another better or easier way to accomplish this, I'm open to an...A print macro?
Hello. I am using Excel 2000. I have made a spreadsheet that will allow me
to produce W2 forms. It works great, but I need some help with the printing.
On one worksheet I have the information so that i can produce 100 W2's. I
have 2 per sheet just like the real form. When I print preview I have a
total of 50 printable pages.
What I would like to do is to have a dialog box that I could type in page 1,
page 2, etc.
What my plan is to print 1 page at a time. I have to print 6 copies of each
W2. I would like to type in a dialog box etc. "page 1" and have the macro
know that I wa...Macro for EACH workbook-->help modify to ONE macro for ALL workbooks?
Below is my macro that works 'perfectly', cross-platform on both Windows
Excel97 and Mac OS 9, Excel 98, except...
My problem is that I am using '6 edited individual macros', rather than just
'a single macro' for 6 workbooks that call the macro.
How can I have my macro set a file name in the macro to that of the
workbook's name that is calling the macro???
I currently run an 'edited copy' of my macro (see below), from within 6
different workbooks by clicking a button in the open workbook
The macro finds and opens a specific workbook named "a_DK...