Write a code by code

How can I write a code from procedure to some Workbook's
ThisWorkbook? With procedure1 a make Workbook with a table.
I need to write Auto_Close procedure to ThisWorkbook which
makes some controls before I close it. Is it possible?
0
jenista.j (1)
3/23/2005 1:25:05 PM
excel.misc 78881 articles. 5 followers. Follow

1 Replies
573 Views

Similar Articles

[PageSpeed] 5

<jenista.j@discussions.microsoft.com> wrote in message
news:0be501c52fab$ba0b6830$a601280a@phx.gbl...
> How can I write a code from procedure to some Workbook's
> ThisWorkbook? With procedure1 a make Workbook with a table.
> I need to write Auto_Close procedure to ThisWorkbook which
> makes some controls before I close it. Is it possible?

You can find some information here:
http://www.cpearson.com/excel/vbe.htm

/Fredrik


0
3/23/2005 2:34:43 PM
Reply:

Similar Artilces:

Is there a way for Windows Service to Read/Write HKCU Reg key ?
Hi: I'm writing a Windows Service program which needs to read/write the HKEY_CURRENT_USER registry key for the current logged on user. I know that for a Windows service does not have concept of HKCU since it is always running in SYSTEM's context. But is there a way (trick?) for a service to access the HKCU registry key? Thanks In Advance ! Polaris Hello Try, from a user application (the one that is logged on, or the current user), to send the services the user's SID. Then access the HKCU through HKEY_USERS\users_sid\............ Hope that helps, Elias "Polaris&qu...

Write
I am trying to change the default margins. I am requested to use the Write mode to do this. What is Write, and how do I access it? Are you using voice recognition? Margins are simply changed in the Arrange Menu in Publisher. Are you in the right newsgroup? -- Mary Sauer MS MVP http://office.microsoft.com/ http://www.mvps.org/msauer/ news://msnews.microsoft.com "CBC" <anonymous@discussions.microsoft.com> wrote in message news:183bb01c44a40$107bd5d0$a501280a@phx.gbl... > I am trying to change the default margins. I am requested > to use the Write mode to do this. W...

Command button on click code
Can someone give me and example code to transfer a DB with a command button click to my ftp server? Thanks Klaus ...

Help! Keep getting problem in email coding...
I don't know why when I reply a friend's email, she always complain that I sent her scrambled texts... I have checked: If the email is initiated from my Outlook 2003, she has no problem of reading it. The code-set is correct. If the email is originated from her and I reply her, due to her email setting, my Outlook 2003 always use "Unicode UTF-8", which she cannot read. This is annoying. I tried to find a place to change/make Outlook 2003 more smartly... but I could not find the option. There is only one option, but it insists on letting Outlook 2003 "automatical...

Writing formula for excel worksheet
Item Rate1 Rate2 Rate3 A 3 4 6 B 8 5 23 C 56 5 78 Above is my excel sheet. I want to write some formula so that in every row cell having minimum rate should come bold. Like For Item A - Rate1(3) for Item B - Rate2(5) For Item C - Rate2 (5) There may be a neater way but this works. Somewhere in you sheet in a cell type =min(A1:a4), I used L1 Change this to watever range you are trying to evaluate. Then select this range and click format - conditional format - cell value - is equal to =($L$1) and apply your bold font. The lowest value in the range will then become bold. Mike "Gaur...

write protect/write redirect/kios mode
Hey, I LOVE snapshots in virtualmachines and think it would be awesome to have something like this for my main windows install. Anyone know of any hardware/software to redirect writes to another drive/file/memory/hardware? Or hardware to write protect a drive for kios's (i found some once befor the reverted all changes on shutdown, but cant find it anymore ><) I know VSS(virtual shadow copy service) has a function to redirect on write and wondering if i might be able to use that :/ It will just make everything cleaner, and give alot of flexiblity to setting up ...

Cannot write to memory location
I can not (all of the sudden) run Publisher in the last week. When starting to run it, I get that it cannot write to a certain memory locaiton, so it is shutting down. I need to get this program working. I have read through this forum and tried the different fixes as well as the knowledge base (emptied the temp file, disabled anti-virus, etc.) but it still won't work. An example is: "The instruction at "0x77f585c0" referenced memory at "0x00000000". the memory could not be "written". Click on OK to terminate the program." The header read...

how do i write checkbox to.....
This is a multi-part message in MIME format. --------------050607000103070200020407 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit how do i write checkbox1 boolean to xml in vb6 i can only do cstr( checkbox1.value) but in vb.net can't write to xml. i am doing irc chat similar to mirc or pirch chat. rw.WriteConfigInfo("User Modes", chkInvisible.Text, chkInvisible.Checked, "PirateChat.xml") in procedure events: ' Both the Key and the Value are filled ' Find the key ...

Reveal Codes
Having used WordPerfect for many years, we are now beginning to use Word. In WP, there was a feature that allowed you to see all formatting codes called Reveal Codes. Is there a similar feature in Word? Thanks. In which version of Word? For example: In Word 2002/2003 > Format > Reveal Formatting With fond memories of WordPerfect 5.1 for DOS, Daddy "DJT" <DJT@discussions.microsoft.com> wrote in message news:DFC1B95B-1C81-43FA-A128-49140ACF7A15@microsoft.com... > Having used WordPerfect for many years, we are now beginning to use Word. > In &...

Write access to a LDAP server.
Is there any way to enable write access in Outlook to my LDAP server? The LDAP server allows this functionality, Outlook doesn't. Any plugins that can do this? Thanks. Derek ...

Integration Product Type Code
I'm trying to setup the integration from CRM to GP using the Settings and Administration tool. When I go to setup a link for a Product Type Code, the CRM field is showing a number instead of a name. For example, instead of showing "Discontinued", it's showing "5". I assume this number is the value of the "Discontinued" name, but how can I get it show "Discontinued" instead of "5"? -- Brandon Presentations Direct - "Document Finishing Solutions" http://www.presentationsdirect.com ...

Writing a macro in Outlook 2007
Hello - I have been trying to create code in Outlook 2007 that will send an item to a specific printer. I realize there is no macro recorder in Outlook, and I am not a programmer, so I've been trying to manipulate code found on a Microsoft support page, without success. Does anyone know the code required to send an item to a specific printer, other than the default? Here is a sample of what I've found - it includes resetting the default printer: Sub MAIN 'Retrieve and set information about the current default printer Dim FPS As FilePrintSetup GetCurValues FPS ...

MULTI STORE ORDER WRITING-SIMPLIFY
Hi- We have 7 stores and need to simplify the order writing process. Is there any way to write POs for all of our stores without having to do each order separately? We would like for all orders to come up with the items we want to order, being able to change the quantities according to the store. Thank you in advance for your help. This is a multi-part message in MIME format. ------=_NextPart_000_0599_01C6CAFF.B4705610 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable J, Have you tried the 340 PO Planner worksheet? --=20 * Get Secure! - ...

is there anyway to make it so the users of my excel spread sheet cant view the macro code w/o a password?
is there anyway to make it so the users of my excel spread sheet cant view the macro code w/o a password? While you're in the VBE: Select your project Tools|VBAProject Properties|Protection tab Give it a memorable password. Daniel wrote: > > is there anyway to make it so the users of my excel spread sheet cant view > the macro code w/o a password? -- Dave Peterson ...

XmlTextReader -> XmlTextWriter chain with minimal code?
What is the simplest way to create a pipe from an XmlTextReader to XmlTextWriter? I am talking about a straight copy. Thanks! Jiho Jiho Han wrote: > What is the simplest way to create a pipe from an XmlTextReader to > XmlTextWriter? I am talking about a straight copy. It's XmlWriter.WriteNode(XmlReader, bool) method. -- Oleg Tkachenko [XML MVP, XmlInsider] http://blog.tkachenko.com Oleg, Thanks for the response. However, I am getting no output using the code snippet here: MemoryStream ms = new MemoryStream(); XmlTextWriter xmlTextWriter = new XmlTextWriter(ms, Encoding...

how to write a formula
I have just taken over as manager of a boarding house and need to come up with some formulas to allow me to enter a dollar amount in cells c1:c12 and then have excel convert that to a day value( 1 day = 13.57) , it then needs to take the date in cells d1:d12 add the reultant conversion and place the result in cells e1:e12 as a date in real time ( 23/05/205). Also is it possible to get excell to print out a receipt for each entry that is made. I have never used excell and currently do it manually with Word which is hard and long In E1, just enter =D1+(C1/13.57), format as date and copy...

Refresh/Requery code and location for command button
Please help. I cannot figure out how to refresh (requery) a record in a subform. Main form is frmClient Subform is frmClientReferralsubform (subform and source form have same name), set to Continuous forms. Each record is a single line of read- only fields and an Edit button. Clicking one of these buttons opens form frmReferral with the relevant record displayed for editing. I can't figure out the correct code to reflect any changes on the original subform when frmReferral is closed OR which event to use to trigger the code. I'm afraid my attempts to research this have just left me ...

possible conflict in coding
I am having trouble with a query which involves multiple parts. It is tied up with asset management. In a nutshell there are three components CRC(Current Replacement Cost), ACC_Dep (Accumulated depreciation),WDCC (Written down current cost). Other commponents include difference between construction date and current date, design life of asset. When the date difference is equal to the design life the answer is 0 the e.g CRC= $64960, WDCC= $4256 (it should read the same as CRC/Design life (in this case 15)) and the ACC_dep is $64960 and it should read CRC-WDCC. As a result the totalsof all the ro...

Code and Creation 86571
This is a free and informational site I created for application development and application development source on the net. Enjoy, and it's free, nothing to register oir sign up for just an informational site. http://codeandcreation.com &cg)?AkSags@wce@$GwSyN?#E ...

get code from some rows
Hi I have this data: A B C D 1 code1 name1 2 3 4 5 6 7 8 9 10 code2 name2 I have each ten rows a code in column A and other data in the other columns. I want the codes that repeat each ten rows to show in column D like this: A B C D 1 code1 name1 code1 2 code2 3 4 5 6 7 8 9 10 code2 name2 Thank you so much Strictly speaking, your codes are appearing every 9th row, going by your example. Is your next code on row 19? If so, then you can put t...

windows 7 updates error code 646
Greetings I installed windows 7 enterprise. Each time I try to do an update i get error code 646. I've manually installed office 2007 sp2. It still shows this as an update, and when i do that it fails with error code 646. What have i done wrong here, and why does this show as an update when its installed already. I appreciate any assistnace and thank you. See http://social.answers.microsoft.com/Forums/en-US/vistawu/thread/6e716883-7af4-4a9f-8665-2f4dd57eee8d star_spl wrote: > Greetings I installed windows 7 enterprise. Each time I try to do an > update > i get e...

writing on an excel file
my employer emailed me an expense report and i downloaded excel. i can't seem to write on this document. is it because its a read only fiel? how do i convert it to be able to edit and write in my expenxes? HELP!!!!!! is it because it's read only ? - check with properties under explorer. either change it there, or save as a different name Steve On Sat, 02 Sep 2006 18:06:02 +0100, RITZ <RITZ@discussions.microsoft.com= > = wrote: > my employer emailed me an expense report and i downloaded excel. i can= 't = > seem > to write on this document. is it because i...

Write Error
We have four registers that we have been running for two years with RMS. Recently we started to use the 4th one again after a long time and everyother transaction activates a Write Error. None of the other registers have the problems including one that hasn't been used for the same amount of time as the fourth and there have been no significant changes to any computer besides microsoft updates for XP. Help Please -- Rich O''Boyle IT Tech Lundeens Liquors Are all registers on the same RMS version. ? What is the version # ? Have you upgraded to Service Pack 2 or 3 on all mac...

Code to find all / next in a row of data
XL 2007 on XP Pro: I have a s/s with many names in cells along a row (in random order.) Some names may be the same. So I am trying to write a macro to "Find" the names that match one entered into a cell by a user. He should be presented with those that match and be able to select the one required. The active displayed cell should then move to that column in the row so that he can update data in the cells below. I have tried recording a macro using the "Find" in Excel but it does not record. Can anyone assist? Instead try data>filter>autofilter>...

read only and write only
l would like to protect my work from other user not all but for the certain column.for example ; column A 1,A2 ,A3 ,B1 B2,B3 ,C1,C2.C3 and D1.D2 D3 are for write only.{ Column A23, A24,A25 ,B23,B24,B25 ,C23.C24,C25 and D23,D24,D25 ,all the data here are copy from above like A23 is data from Al , so is it any way that the other user can,t change any data here} thank you Select the cells you want your users to be able to alter (CTRL + Clck if they are not adjacent) and then:- Format|cells|protection and remove the locked checkmark. then Tools|Protection|protect sheet. User are now pr...