using macro to open a workbook

Can anyone help me with creating a macro ?  Please.
I know how to activate an opened workbook, save and close it using macro.
How do I creat a macro that will open a not-yet-open workbook ?
I don't mean to use a link.


0
danchen (87)
2/5/2004 12:23:55 AM
excel.misc 78881 articles. 5 followers. Follow

1 Replies
186 Views

Similar Articles

[PageSpeed] 53

Try something like:

Sub OpenABC()
Workbooks.Open Filename:="C:\test\abc.xls"
End Sub

Steve


"daniel chen" <danchen@worldnet.att.net> wrote in message
news:v2gUb.177029$6y6.3438010@bgtnsc05-news.ops.worldnet.att.net...
> Can anyone help me with creating a macro ?  Please.
> I know how to activate an opened workbook, save and close it using macro.
> How do I creat a macro that will open a not-yet-open workbook ?
> I don't mean to use a link.
>
>


0
syandl (24)
2/5/2004 12:43:37 AM
Reply:

Similar Artilces:

300 Locations+ using RMS?
Does anyone out there have 300-400 locations operating on RMS? Is this even possible. Currently we have 80 with a projected 150 next year and 200 following. Within 5-10 years we will hit 500-1,000. Can RMS support a company of our size? Has anyone pushed the system to this level? -- Jocelyn wow :) Is there a HQ Dongle with license up to 1000+ locations...your company is rocketing :) Is your company in fashion retail ?Food? Your implementation is quite big. how was the performance of RMS hitting 80 locations? Are you using HQ (I suppose you do.)? how's the speed in terms of conne...

Having Formatting Remain on "Called" cell using IF function
I'm using an IF function to call some other cells, but I want to have the various words color coded, eg ("Certified" is green, "Recertify" is yellow, and "Not Certified" is red). I have the IF function working correctly, but when it "calls" the cell to have it display the appropriate word, the color of each word is not brought along with it...only the text. Is there a way to be able to color code it so that the appropriate color appears? Thanks! -- Zaraf ------------------------------------------------------------------------ Zaraf's Profi...

Using auto
Hi, Good Day to everyone... I 'am currently using Microsoft Outlook 2003...My Boss wants me to make accounts that will be able to send and receive messages....I have been trying to do it manually, but when I try to do the send/receive messages an error occurs. Someone explained to me to do a Auto Configuration using the cpanel of the site....I tried it but then I don't know how to use it.....in the Tools menu the send and receive button disappeared.....i have no idea on what is currently happening.....and I can't make sure if the mail accounts have been add to outlook e-m...

Office apps won't open, report Office in use by another use
Version: 2004 Operating System: Mac OS X 10.4 (Tiger) Processor: Intel A few days ago, our Office applications started showing the report that "An Office program is being used by "user." your installation exceeds the number of installations permitted by thelicense agreement. Click More Information to learn about Microsoft Office licensing." But OFFICE ISN'T BEING USED BY ANYONE. All computers have been restarted to no avail. HELP! <sakas@officeformac.com> wrote: > A few days ago, our Office applications started showing the report that > "An Office p...

Opening Email Program in IE8
When I try to open my email program with the envelope icon on my IE8 toolbar I get the error message: cannot perform this operation because the default email client is not properly installed. This was working fine and suddenly stopped. How can I correct? Always state your full Windows version (e.g., WinXP SP3; Vista SP1; Vista 64-bit SP2; Win7; Win7 64-bit) when posting in a forum or newsgroup. Please do so in your next reply. Also state your default Mail Client (e.g., Outlook Express; Windows Mail; Outlook; Thunderbird; Windows Live Mail; Yahoo Mail). -- ~Robear Dyer (PA...

Getting a LockMatchID error using sp_rename
When I'm trying to rename a table in the tempdb table, I'm getting an error when I run it in a stored procedure or code, but it works ok on MSSMS. I get the error: Invalid EXECUTE statement using object "Object", method "LockMatchID". EXEC sp_rename 'Tempdb.dbo.oldFile' , 'newFile' Don't ask me why I have to mess with the tempdb files (This is probably the problem). But I have old legacy code that writes to the tempdb database. On Jul 14, 10:00=A0am, Cindy Lee <danparker...@yahoo.com> wrote: > When I'm trying to renam...

use of countif()
Hi. Does anyone knows how can apply the countif() function partial? (for ex. If i have the column A10:A100 to apply countif() in the follow cells A54, A67, A72:A79 , A87, A91:A95, A98.) If that impossible, any other idea? Thanks. One way =SUMPRODUCT(COUNTIF(INDIRECT({"a2","a5","a8","e10"}),"a")) -- Don Guillett SalesAid Software dguillett1@austin.rr.com "nikos" <nikos@discussions.microsoft.com> wrote in message news:0702BFB4-B60A-42D4-8B04-C5D055CC5072@microsoft.com... > Hi. > > Does anyone knows how can appl...

Find function in a macro
I want to set up a macro that searches a column for a value 'X' and then selects the cell right under the cell that contains 'X'. I have been stumped on this for a few days now and would really really appreciate any sort of help or guidance. Thanks a lot! SK --- Message posted from http://www.ExcelForum.com/ Sub Findit() Dim r as Range For Each r in Range("A1:A1000") 'Or whatever yours is If r.Value = "X" Then Range("A" & r.Row+1).Select 'Change A to your column Exit For End If Next End Sub K P.S. You could probably use an...

dynamic charts using named formulas
I have dates in the first row I have values in the second row I use tecnique of named formuls of offset function (tushar Methta) so that the chart is updated when data for new dates are added. now after some time I want to delete the older data If I delete the columns of older dates the named formula get messed up and I get error message that three is some wrong reference. actulally in the offset formula the starting cell is relaced by "REF" Then I have to redo the whole exercise any solutions. If the first row is some sort of header that doesn't get deleted, use it as the ba...

Outlook 2007 Auto open email from known sender
There are a few people in my contact list with whom I need to keep in constant contact. A nice feature would be, for those individuals I trust, to automatically open email on my desktop, or at least to make the auto-notification window persistent. Thanks, Jeff ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader a...

Outlook 2003 Bcm Cannot open outlook
Contact Manger has encountered a problem and need to be closed. Event Type:BCM P1:mapi P2: Typeinitializationexception P3: 1.0.2002.1 P4:11.0.8118 P5:nativemsproviderinit P6:msproviderinit P7:D40099TB Is there a fix for this error? Cortexmann wrote: > Contact Manger has encountered a problem and need to be closed. Event > Type:BCM P1:mapi P2: Typeinitializationexception P3: 1.0.2002.1 > P4:11.0.8118 P5:nativemsproviderinit P6:msproviderinit P7:D40099TB > Is there a fix for this error? Any changes to the system between when it worked and when it didn't work,...

"Global" search in a workbook?
I have a large workbook with several sheets with similar contents. I need to search for various text strings in the workbook and want to find all occurrences, regardless which sheet they're on. The only way I have managed is to open one sheet at a time and search for the string, which is extremely tedious.=20 Is there a way to perform as "global search" in a workbook? That would help me a lot! Thanks, G=F6rel G�rel Do a search for flexfind on google. This is an add-in that will list all occurrences of each find, in a dialogue box. Andy. "G�rel" <gorel@dang.s...

Validation code for macro to run
Hi...the code below works fine, but how do I change it so that it doesn't look for a blank cell (""), but looks for specific text in a cell? There is an If formula in cell C269 so that if 2 figures balance then this cell displays "TRUE", otherwise it displays "FALSE". The code mustn't run if Cell C269 displays "FALSE". If [C269] = "" Then MsgBox "The figures don't balance!!" Exit Sub End If Range("E1:E48").Select Selection.Copy End Sub Thanks. Rob Rob, try this, If [C269] =...

running macro when workbook is openned
I have the following macro it should run when the workbook is opened. I keep getting an error message. Any ideas. Isthere something that is missing Option Explicit Sub Update() With Sheet5 ActiveSheet.Unprotect Application.EnableEvents = False If UserForm4.CheckBox60.Value = True Then Sheet5.ComboBox3.Visible = True Sheet5.Label5.Visible = True Sheet5.TextBox29.Visible = True Sheet6.ComboBox3.Visible = True Else UserForm4.CheckBox60.Value = False Sheet5.ComboBox3.Visible = False Sheet5.Label5.Visible = False Sheet5.TextBox29.Visible = False Sheet6.ComboBox3.Visible = F...

Excel to XML: Need some help fine tuning a macro
Hey all, I've downloaded a Macro http://meadinkent.co.uk/ and have been editing it get the exported XML to appear as required, however I can't seem to get the 2 of my fields to display correctly. There are two fields which have numbers in but are formatted as text because I do not want them rounded up. One cell has -0.08162498 in it and in the exported XML doesn't even appear. Another cell has 51.51891794 in it and in the exported XML appears as 52. My question is how can I get the information to appear as I've typed it in rather then rounding it? I have cha...

Cannot open database ?
Hi Got a database at work I wrote in 2003, brought a copy home to modify and use here. Now got Access 2007, can load initial form (switchboard) but none of the command buttons work. Can get to design view, all queries and tables run okay. Looked on Tools\User & Group Permissions - Open/Run is the only disabled button on the forms only. All tables, macros etc. all buttons enabled. Access has the Open/Run button disabled. Any idea how I can enable it and run my database please? Thank you Al On Sat, 30 Jan 2010 08:16:01 -0800, Al9315 <Al9315@discussions.microsoft.com>...

using an NPV formula
=NPV(After_tax_investment_rate,I14:I23) The problem I am having is that the I14:I23 needs to vary. In one instance it needs to be I14:I50 another time I14:I20. Is there a way to automate that so it automatically sees the different length on the list and enters it within those brackets? Help..... :-) Thanks in advance. Tom See http://cpearson.com/excel/named.htm#Dynamic In article <gawFd.67880$Xk.16617@pd7tw3no>, "Tom" <tom.c@shaw.ca> wrote: > The problem I am having is that the I14:I23 needs to vary. In one instance > it needs to be I14:I50 anot...

Retore original screen when macro ends
After running a macro, I would like to try and restore the screen to the exact view that the user had before running the macro - i.e. on the correct page and at the correct line, with the cursor in its original position and the screen scrolled to its original point (i.e. not necessarily at the top of the page if that was not the exact screen position). That is, so that the user sees no change to his/her view after the macro has ended. I presume that somehow I have to save all the parameters that define such things as page number, cursor position, zoom ratio, scroll position, et...

Outlook won't open
I was downloading my personal POP-3 email into Outlook on my notebook and then I created a new profile so I could also download exchange email: Now, it prompts me for a username and password and it never lets me in. I never set one up for my default account. There is now only one profile set up on my computer, it is the default "Outlook" profile. Is there anyway that I can get back into my Outlook data? Thanks! What version of Outlook are you using? Note: this group does not support Outlook Express. --� Milly Staples [MVP - Outlook] Post all replies to the group to keep...

Follow Up Macro Question
Earlier, I asked about writing a macro to clear the contents of cells whose value was an alpha dash (-) without changing values or formats of the other cells. Based on expert feedback, I came up with the following solution. Highlight the desired range and run the following macro. Sub ClearDash() Dim s As String s = "-" For Each r in ActiveSheet.UsedRange If r.Value = s Then r.ClearContents End If Next End Sub This works just fine unless a cell in the range contains an error value such as #N/A in which case the macro aborts a...

how to encapsulate a variant using CComSafeArray ...
Hi, I post a piece code (that needs verification about its correctness) shown below but got no reply. Could someone point me some examples using CComSafeArray from the client site? Microsoft has two examples that don't help me a lot. I also tried google the topic but still got some examples that just don't show how to use it from the perspective of the client site. Any instruction is much appreciated. CComSafeArray<VARIANT> edges; CComVariant v = face.GetEdges(); // return a variant of a safearray of IDispatch* edges.Attach(v.parray); v.parray = 0; // to avoid v'...

Using Mail Merge to create email broadcast?
I'm trying to use publisher to create a personalized email message for a list of clients. I see an option to print the results of the merge, how do I send these as HTML via email. Thanks ...

Delete file in "most recent used" section
I have two files that I have moved on my computer. Now whenever I load excel it tells me that a file is missing, and the "open a workbook" section contains two files which no longer exist. How can I delete these from "open workbook". When I click on them, obviously Excel can't locate them. Thanks Click on Tools....Options....clear the recently used file list....click on Okay. The history should be cleared. Repeat steps to have that feature return. "Scott" wrote: > I have two files that I have moved on my computer. Now whenever I load excel >...

conditional printing? macro?
here's my situation, i have a workbook with many sheets in it, each sheet if the default print shortcut button was used would print to 4 pages of A4 paper. the data on these sheets varies everyday, someday's only 1 page per sheet would be full of data others 2, 3, or 4 etc. how could i write a macro that would be able to print only the needed pages?, each page, if it contains any data would have a value in a totals cell. so i would need code along these lines Sheets("sheet1").Select IF(OR(total1="",total1=0),"don't print","don't print"...

Any way to highlight rows without using macros?
I thought I used to be able to highlight rows containing certain text but I can't figure it out now. Conditional formatting will only wor on individual cells, right? I work a lot with filtered lists, and if there were some way to sho not only the filtered row but also the one above and maybe the on below that would also achieve my objective, which is to have a forumul in thefiltered row that uses data from the previous row, and then t show them both together without any other rows. Sorry for the newbie-like question, but sometimes I just draw a blan on how to do something in Excel. ...