Answer Questions
Syed Junaid macro in .xml
Hi, There is an excel template which I sometimes make changes to and then save it as .xml I have always been able to save the file as .xml without any issues. Now a simple macro is added to the Workbook_Open() event. I can still save the .xls as .xml but it seems that the macro does not get saved inside the .xml file. Is there a way around to get the Macro inside the .xml file Thanks ...Show All
Trivolve Auto Indentation for VBA
Hello, I am still new to VBA IDE. I am wondering if there is add-in or tools to make VBA do auto indentation like Eclipse editor for Java. Any help are very appreciated. Thanks in advance. Excel MVP Stephen Bullen has a Smart Indenter add-in on his web site, two versions in fact, VBA and VB6. Stephen's site is at http://oaltd.co.uk - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions http://PeltierTech.com _______ Thank you so much Jon. This works very well for me. Yes, I am looking for a tool to restructure the indents automatically. Thanks anyway. Go to Tools|Options. On the Editor Tab t ...Show All
VulturGryphus VBA doesn't listen to my Format command...
Hi all, I'm having a problem with formatting text in a userform. my code: Private Sub txtUurloon_BeforeUpdate(ByVal Cancel As MSForms.ReturnBoolean) Dim txtTmp As String txtTmp = txtUurloon.Text txtUurloon.Text = Format(txtTmp, "€ ###0,00") End Sub When i put in for example 1 then my textbox updates and shows € 001... While it should be: € 1,00! Does anybody know what i do wrong Greets Guus HI, Try moving the euro symbol out of the format statement. Private Sub txtUurloon_BeforeUpdate(ByVal Cancel As MSForms.ReturnBoolean) Dim txtTmp As String txtTmp = txtUurloon.Text txtUurloon.Text = " €" & Format(txtTmp, " ###0,00") End Sub ...Show All
svxtc Can you use VBA to access a spread sheet embedded in a word doc?
I am trying to use VBA code written in MSWord to access an embedded spread sheet. I can't find any documentation on how this is suppose to work. Does word access the sheet through an instance of excel Is the sheet part of the document so I can find it in the "ThisDocument " I have tried everything I can think of, so any help would be appreciated. I can't find any documentation on an msoEmbeddedOLEObject, and wdOLEVerbHide seems to work fine. Also, DoVerb is limited to wdOLEVerb___ enumerations. Nice piece of detective work ;) To use macros in 2007 you have to go to “word options” and select “Show developer tab in the ribbon.” I am using “ msoEmb ...Show All
Sai A hyperlinks don't work when pointing to file shortcuts
Y'all-- I am using Access 2002 and creating an application that converts large sections of a user's file directory structure into tables of hyperlinks for querying and analysis. To do this, I have invoked the FileSystemObject and used GetFile and GetFolder in a recursive function that 'crawls' over the directory - grabbing 'Path' and 'Name' attributes and concatenating them with a hyperlink '#' separator. If a user clicks on the link in a form, backed by the resulting table, it follows effectively to the target file/resource, regardless of type. But(!) if the links are then followed from code using the object.hyperlink.follow method, everything works as expected when a link is a regular file or a URL...but when a file shortcut has be ...Show All
webrift paste into next blank column
hi.. i need a VBA code that can paste data column by column.. i have the code as below: If CheckBox1.Value = True Then Sheet7.Range("Time").Copy Destination:=Sheet4.Range("A2") End If If CheckBox2.Value = True Then Sheet7.Range("Input").Copy Destination:=Sheet4.Range("B2") End If If CheckBox3.Value = True Then Sheet7.Range("Output").Copy Destination:=Sheet4.Range("C2") End If If CheckBox4.Value = True Then Sheet7.Range("Cycle").Copy Destination:=Sheet4.Range("D2") End If this is an ideal case if i click all the check boxes and as a result the values will be pasted in sheet4 side by side. but what if i just check check boxes 1 and 3, how should i paste them next ...Show All
Andr&#233&#59; Dias How Can I Register The Yahoo DomainKey For My Mail Server ?
How Can I Register The Yahoo DomainKey For My Mail Server Thanks Send it flowers ...Show All
Ori' Can you tell me why Int(1.4 * 100) = 139
Can someone help me to find solution: Int(1.3 * 100) = 130 Int(1.4 * 100) = 139 (also Int(1.38 to 1.49 * 100 ) ) Int(1.5 * 100) = 150 (VBA:Retail 6.0.874) Thanks in advace I am not sure why, but after some testing. It is pretty interesting. Anyway, to solve this issue, use CInt instead of Int. The Int() function seems to give this strange result, but CInt is totally fine. Also this problem only happends when you use Int() function. If you just do msgbox cstr(1.4 * 100), it will give you 140. Try this code to see how things behave. ' explicit double Dim a1 As Double, a2 As Double a1 = 1.4 a2 = 100 MsgBox "CStr(a1 * a2) = " + CStr ...Show All
Coroebus VBA function having it's name's case changed in excel
I am just starting with VBA / excel though I am a moderately competent programmer. I created a function B4FirstBlank() (written exactly like that) that looks at a Range reference and finds the value of the cell before the first blank cell. It works fine but whenever I type it into excel it is rewritten as b4fIRSTbLANK() which doesn't do much for me in terms of readability. I get other strange rewriting of functions too, any guidance on how to sort this out much appreciated. Andrew Thanks for the reply. I've had a good look and it is definitely called B4FirstBlank(). For some reason it is now appearing as b4firstblank(). I have also looked for multiple definitions and while I do have the same function amo ...Show All
Big Bob Cooley Workbooks.Open (... problem
Hi all, I am trying to open a workbook in readonly mode. I have tried Workbooks.Open(WorkFN, 2, True) but this is asking to assign the result to a variable. i.e. it won't compile without an "=" sign. What am I doing wrong I just want to open the file, copy some stuff out of it, and then close it again. Fell at the first hurdle! Cheers, Steve. Hi Just lose your brackets and all should be well i.e. Workbooks.Open WorkFn, 2, True Brilliant - thanks! Steve ...Show All
sax autocomplete
Hi all, I have a form with several combo boxes. I would like the users to be able to start typing in the field and it automatically completes the box. Can someone tell me how to get my form to autocomplete Thanks Hi, You can use AutoComplete* properties to accomplish this task. If you want to give your own list for suggestion use AutoCompleteCustomSource, You can also set mode either suggest or change by setting AutoCompleteMode, There are also few builtin Source you can set them by setting AutoCompleteSource. Now for example you add two values in collection of AutoCompleteCustomSource Saml and Martin and set AutoCompleteSource to CustomSource then when you type S it will suggest you Saml if your AutoCom ...Show All
яeverser Confused by "Null"
Hello~ It seems to me that the value NULL has some strange and inconsistent behavior in VBA. I would appreciate if anybody could help me out with the NULL - I guess there is something special about NULL that I haven't realized. Here is a recent example: The codes below is expected to calculate [TwoEstDate] according to the updated value in textbox [Text_OneReturnDate]: if it is null then the [TwoEstDate] is null, otherwise [TwoEstDate] is the 10th Monday after the [Text_OneReturnDate]. To debug, I added a watch for the value of [Text_OneReturnDate]. When I clear the contents in [Text_OneReturnDate], in the watch window, it shows Me!Text_OneReturnDate.Value is Null. So it should be line 1 that is executed. But what actually happened was, th ...Show All
jeffmccracken Office 10 \ winword.exe runtime error
I have downloaded the service pack 3 but I'm still encountering the problem when I try to open MS Word. MS Excel, MS Outlook , MS Powerpoint & MS Viso all work fine. Any time I try to open MS word I receice a Box vissual c++ runtime library. This application has requested the runtime to terminate it in an unusaul way. Microsoft Office\Office 10\Winword.exe. Hi, I had exactly the same problem with Office 2003 and principally with Word 2003. I noticed the problem only occured after I typed a few words on a document, or when I chosen to open an existing one. So, what's happening after typing a few characters Spelling check ... indeed. The default language of my office installation was in D ...Show All
LKeene Comparing and filtering data in Excel?
I’ve been given the task of comparing two sets of employee data, both of which are in the same layout/format, and am required to filter out those which are duplicates i.e. should leave only new starts. I have been told that a Vlookup function can be used to achieve this but don’t know how it can Would this be easier to accomplish using VBA If yes, could I have a brief structure of the code required To elaborate, the spreadsheet contains a unique employee ID and other details such as department, manger, email, etc. One set of data is from the previous months upload and the other is the latest data pull. I need to compare this months data with last months and see who is present that wasn’t before. Any help is much appr ...Show All
kjk___ Recommend a book please
I am in the very early stages of trying to teach myself VBA for MS Word. I have some knowledge of programming in Java and C++. I need a good book to get me started. I have found it is not the code itself that I am having trouble with, it is how the environment works that has me confused. I need to see how to implement solutions to some basic real world problems. Seeing code examples in isolation is not proving to be of much use, I can work that out. I need to see examples of how you implement the code and incorporate it into documents for use, and then how you use it. For example I need to know the whats, hows and whys of projects, modules, class modules, objects, user forms, references, MS Word objects and templates etc. All these term ...Show All
