Search Results

Search found 1188 results on 48 pages for 'vba'.

Page 16/48 | < Previous Page | 12 13 14 15 16 17 18 19 20 21 22 23  | Next Page >

  • MS Access-VBA _ Save a Report to Hard Drive

    - by ledge16
    Hi all, need some help with this code if anyone can answer. Any suggestions are most appreciated. I have a report that I want to save to my hard drive when clicking a button. When saving the report I want the filename to be created using two pieces of information from the report. Variables: Report = "Contract" Save Location = "C:\Folder\" File Name = [Customer] & " _ " & [Date] File Type = PDF Thank you!

    Read the article

  • Count if with two criteria excel vba

    - by Manasa J
    can some one help me create a macro for the following Data.The values in GradeA,GradeB etc.. columns need to be populated by checking sheet1 ColumnB(Student Name) and columnH(Grade).I need both row wise and Column wise total. Student GradeA GradeB GradeC GradeD GradeE GrandTotal Std1 1 0 2 0 0 3 Std2 0 0 0 1 1 2 Std3 1 0 1 0 0 2 Std4 0 2 0 3 0 5 Std5 0 1 2 1 0 4 Std6 1 0 2 0 2 5 Grnd 3 3 7 5 3 21

    Read the article

  • distinction between using .text and .value in VBA access

    - by every_answer_gets_a_point
    i am passing the textbox1.text values into a query and sometimes into a string sometimes i say this: dim combor1 as string combor1 = comboReason1.Text how do i know when i should put combor1=comboreason1.value ?? also why do i need to set focus for a control to reference its property? that doesn't make sense to me also when i set combor4 = comboReason4.Value and the .value is null, then i get an error about invalid use of null please help!

    Read the article

  • Create xml file based on xPath from Excel with VBA

    - by user1626236
    I've found some items that seem to dance around what I'm looking to do. I'm not a full-fledged programmer, but have been creating my own macros in Excel. I'm trying to create one now that will help me create the structure of an XML file. I want to go down the list of XPaths, and for each one create any parents in the path as needed as well as the child and its value. I'll be adding another aspect to filter it to the fields I want, but the part I'm struggling with is the logic to check if each parent node exists, create it if needed, then add the child and its value. Bonus would be if the output file were formatted with each node on a new line, and more so if it child nodes were indented from parent, but just creating it is my primary concern. Any help would be much appreciated, this has to potential to save me a lot of time.

    Read the article

  • Offset the tickmarks of a secondary axis

    - by Dan
    I would like to offset the tickmarks of a secondary axis in excel WITHOUT changing the minimum. Here is a very complicated VBA class that apparently solves the issue but I would like a solution that doesn't require me to construct my entire chart in VBA. Here is an example of what I mean (I removed the chart insides so it looks funny, but really only the axes matter for this question): I am happy with the primary axis on the left. The secondary axis is just the primary axis plus 7.96%, so the secondary axis HAS TO have 0.0796 as a minimum. But I would like my tickmarks to be at nice rounder numbers so I would like to offset the starting point of the secondary axis' tickmarks to only start at 8%. Does anyone know of a way to achieve this? Just to be clear about the VBA, I am happy to use a VBA solution but I don't have the time to actually construct the chart itself in VBA. Using VBA to get a handle on the chart and make the adjustment would be perfect.

    Read the article

  • How to Transfer Large File from MS Word Add-In (VBA) to Web Server?

    - by Ian Robinson
    Overview I have a Microsoft Word Add-In, written in VBA (Visual Basic for Applications), that compresses a document and all of it's related contents (embedded media) into a zip archive. After creating the zip archive it then turns the file into a byte array and posts it to an ASMX web service. This mostly works. Issues The main issue I have is transferring large files to the web site. I can successfully upload a file that is around 40MB, but not one that is 140MB (timeout/general failure). A secondary issue is that building the byte array in the VBScript Word Add-In can fail by running out of memory on the client machine if the zip archive is too large. Potential Solutions I am considering the following options and am looking for feedback on either option or any other suggestions. Option One Opening a file stream on the client (MS Word VBA) and reading one "chunk" at a time and transmitting to ASMX web service which assembles the "chunks" into a file on the server. This has the benefit of not adding any additional dependencies or components to the application, I would only be modifying existing functionality. (Fewer dependencies is better as this solution should work in a variety of server environments and be relatively easy to set up.) Question: Are there examples of doing this or any recommended techniques (either on the client in VBA or in the web service in C#/VB.NET)? Option Two I understand WCF may provide a solution to the issue of transferring large files by "chunking" or streaming data. However, I am not very familiar with WCF, and am not sure what exactly it is capable of or if I can communicate with a WCF service from VBA. This has the downside of adding another dependency (.NET 3.0). But if using WCF is definitely a better solution I may not mind taking that dependency. Questions: Does WCF reliably support large file transfers of this nature? If so, what does this involve? Any resources or examples? Are you able to call a WCF service from VBA? Any examples?

    Read the article

  • Dyanamic Chart Series Labels

    - by McVey
    I have some Visual Basic Code that creates a chart for each row. It sets the series values using this code: .SeriesCollection(1).Values = "=" & Ws.Name & "!R" & CurrRow & "C3:R" & CurrRow & "C8" What I am struggling with is how do I set the series labels? The series labels will always be the 1st row and be in the corresponding column. I know this is much simplier than the code above, but I am stumped. Any help is appreciated.

    Read the article

  • Mass saving xls as csv

    - by korki
    hi, here's the trick. gotta convert 'bout 300 files from xls to csv, wrote some simple macro to do it, here's the code: Dim wb As Workbook For Each wb In Application.Workbooks wb.Activate Rows("1:1").Select Selection.Delete Shift:=xlUp ActiveWorkbook.SaveAs Filename:= _ "C:\samplepath\CBM Cennik " & ActiveWorkbook.Name & " 2010-04-02.csv" _ , FileFormat:=xlCSV, CreateBackup:=False Next wb but it doesn't do exactly what i want - saves file "example.xls" as "example.xls 2010-04-02.csv", what i need is "example 2010-04-02.csv" need support guys ;)

    Read the article

  • MS Access 2003 - Message Box: How can I answer "ok" automatically through code

    - by Justin
    So a couple silly questions: If I include this in some event: MsgBox " ", vbOkOnly, "This little message box" could I then with some more code turn around and 'click the ok button. So that basically the message boox automatically pops up, and then automatically goes away? I know its silly because you want to know, why do you want the message box then..... well a) i just want to know if you can do that, and what would be the command b) i have some basic shapes (shape objects) that are made visible when the message box appears. But without having the message box there, there is no temporary disruption of code while waiting for the button to be clicked, and therefor those pretty image objects being made visible does take effect on the the form. So I really do not need the message box, just the temp disruption that shows the objects. Thanks!

    Read the article

  • Creating a separate excel using Macro

    - by shayam
    Hi, I am having a excel with one column that has got information regarding tender. Each cell will have a value like Column: Nokia([Mode1.Number],OLD) Column: Motorola([Mode1.Number],OLD) Column: Motorola([Mode2.Number],NEW) Column: Motorola([Mode3.Number],OLD) Column: Samsung([Mode2.Number],NEW) I need to create 2 excel out of this. One should 've all the information of the OLD and the second excel should've all the information of NEW. So my output excel should contain First Excel Nokia([Model1.Number]) Motorola([Mode1.Number]) Motorola([Mode3.Number]) Second Excel Motorola([Mode2.Number]) Samsung([Mode2.Number]) Kindly help me.. Thanks in advance..

    Read the article

  • drafts folder hidden outlook 2003

    - by Michael
    Let's say I have managed to hide the draftsfolder in outlook2003. I am wondering how I would be able to retreive it back without the use of 3rd party programs. (for instance as described in this article). I have the following code in outlook 2007. Sub changeProperty() Dim ns As Outlook.NameSpace Dim drafts As Outlook.folder Dim property As Variant property = False Set ns = Outlook.GetNamespace("MAPI") Set drafts = ns.GetDefaultFolder(olFolderDrafts) drafts.PropertyAccessor.SetProperty "http://schemas.microsoft.com/mapi/proptag/0x10F4000B", property End Sub Is there any way to perform this in outlook 2003? (Also thinking if this should be put on superuser.com instead?)

    Read the article

  • How to compare 2 similar strings letter by letter and highlight the differences?

    - by PowerUser
    We have 2 databases that should have matching tables. I have an (In-Production) report that compares these fields and displays them to the user in an MS-Access form (continuous form style) for correction. This is all well and good except it can be difficult to find the differences. How can I format these fields to bold/italicize/color the differences? "The lazy dog jumped over a brown fox." "The lazy dog jumped over the brown fox." (It's easier to see the differences between 2 similiar text fields once they are highlighted in some way) "The lazy dog jumped over a brown fox." "The lazy dog jumped over the brown fox. " Since we're talking about a form in MS Access, I don't have high hopes. But I know I'm not the first person to have this problem. Suggestions?

    Read the article

  • Excel Macro to copy an entire row from one sheet to another based upon a single word, within a parag

    - by jason
    Guys i'm looking for a simple excel macro that can copy a row from one sheet to another within excel based upon having a specific word in the cell. I have a sheet one, called "data" and a sheet two called "final". Here is an eaxmple of the data A B C D john mary 555.555.4939 initial reply to phone conversation Jim jack 555.555.5555 floor estimate for bathroom jerry kim 555.555.5553 initial response to phone call I'd like to copy than entire row from sheet "data" to a sheet "final" if the data in column D contains either the word "reply" or the word "response" somewhere within the paragraph. Any tips would be much obliged. thanks, J

    Read the article

  • How can I make Outlook 2007 auto BCC messages to a specific email with specific words in subject usi

    - by tgadd
    So far I have this code from outlookcode.com which I can get to work sending all emails I send to the BCC email. I am not a developer, so I don't have a lot of context to go about editing this myself, or even approaching researching this. If anyone knows how to make this check for words in the subject, or check if the subject equals a certain string, I'd really appreciate it. Private Sub Application_ItemSend(ByVal Item As Object, _ Cancel As Boolean) Dim objRecip As Recipient Dim strMsg As String Dim res As Integer Dim strBcc As String On Error Resume Next ' #### USER OPTIONS #### ' address for Bcc -- must be SMTP address or resolvable ' to a name in the address book strBcc = "[email protected]" Set objRecip = Item.Recipients.Add(strBcc) objRecip.Type = olBCC If Not objRecip.Resolve Then strMsg = "Could not resolve the Bcc recipient. " & _ "Do you want still to send the message?" res = MsgBox(strMsg, vbYesNo + vbDefaultButton1, _ "Could Not Resolve Bcc Recipient") If res = vbNo Then Cancel = True End If End If Set objRecip = Nothing End Sub

    Read the article

  • In Word, Programmatically Open New Document Dialog

    - by Jacob Adams
    I am looking for a way to programatically open the "New Document" dialog in Word 2007. It is the same one you get when you select File-New . You can also open it using the FileNew macro or the "New..." menu command. However, I have been unable to find a way to do this programmatically. I have tried: Application.Run MacroName:="FileNew" and Dialogs(wdDialogFileNew).Show and CommandBars.FindControl(ID:=5746).Execute but both of these open the old dialog, not the new one that word 2007 uses.

    Read the article

  • MS Access 2003 - Option Group frame: can I add text boxes that are part of the frame instead of rad

    - by Justin
    Ok so this maybe a simple/silly question but I don't know so here goes: In access let's say I want to have a frame control, so I click the option group button and add it to the desgin surface. However, I am not wanting to use this as a option group with radio button selection, instead I would like to add text boxes instead the frame, so that when I reference the frame, it references every control instead of it, hence the text boxes, cbo boxes, etc.....just as it would if they were radio option selections. So can you do this? I want whatever controls I add inside the frame to be easily referenced (i.e. make all controls visible just by using frameExample.visible = true) so that I can build my own tab control groupings..... can this be done? Thanks! EDIT: What I am trying to accomplish is having a form that includes a collection of controls (input controls - cbo boxes, text boxes, etc), that serve as the Main record information. These are saved to a table via an INSERT statement on button_click because this form is unbound. Next I have 8 categories that are relative per each main record (and data that goes along with it). Each of these categories could have a sub form area and a button click that bring it's relative form into the sub form area. These sub forms would be unbound as well as I would just save data via SQL statement. So i know I could accomplish this by running the insert statement from the parent form, on the main collection control's data that would create the KeyID number, then run a SQL statement that would turn around and load that KeyID number right back onto the page in a hidden text box. Then when I click one of the sub forms and load its relative collection of controls, I could then save that data along with KeyID for each of these sub-forms/tables. SO...... I was wondering if instead you could define these controls as a collection so that you could hide and make visible all the ones you need on button clicks and avoid the need for additional forms (subs). I know that if a user enters data into a text box, and then somewhere along the way that box becomes hidden, the data still exists in it and still ends up in the SQL statement.... So I want all these controls to exist on the same form, but I thought what is I could encapsulate them into a frame like an option group, then I could call the frame and all the relative controls would be called up (made visible) as needed. Sorry for the long explanation but I thought it would help.

    Read the article

  • Ms Access Save record in subform

    - by LanguaFlash
    I have a main form with a tab control containing multiple subforms. I need to be sure that the data in a subform is saved when the user switches tabs. The problem is that DoCmd.RunCommand acCmdSaveRecord seems only applies to the current form so it doesn't save the data in the subform. I have tried different events on the subform such as deactivate, OnLostFocus etc but they don't fire until another field somewhere else gets the focus. The ideal solution would seem to be to put something on the OnChange event of the tab control to be sure that all the data is saved. That is my question, how to do I save the record in a subform?

    Read the article

  • Dynamic Chart Series Labels

    - by McVey
    I have some Visual Basic Code that creates a chart for each row. It sets the series values using this code: .SeriesCollection(1).Values = "=" & Ws.Name & "!R" & CurrRow & "C3:R" & CurrRow & "C8" What I am struggling with is how do I set the series labels? The series labels will always be the 1st row and be in the corresponding column. I know this is much simplier than the code above, but I am stumped. Any help is appreciated.

    Read the article

  • Consolidating Columns in Excel

    - by New to iPhone
    I have two columns in excel like the following a,apple a,bannana a,orange a,plum b,apple b,berry b,orange b,grapefruit c,melon c,berry c,kiwi I need to consolidate them like this on a different sheet a,apple,bannana,orange,plum b,apple,berry,orange,grapefruit c,melon,berry,kiwi Any help would be appreciated

    Read the article

< Previous Page | 12 13 14 15 16 17 18 19 20 21 22 23  | Next Page >