Search Results

Search found 4783 results on 192 pages for 'excel vba'.

Page 56/192 | < Previous Page | 52 53 54 55 56 57 58 59 60 61 62 63  | Next Page >

  • 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

  • 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 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

  • 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 2003 - Is there a way to run access (mde) without the access shell around the forms/report

    - by Justin
    So I am not sure if I am asking this correctly; let me explain: IS there a way I can run my MDE without the access shell around the forms/reports? The part that provides the menu, and the little application title. I think it is the overall presentation layer form that all my access stuff sits on, but I am not sure. I am just wondering if you can get rid of it. Thanks

    Read the article

  • FileSearch strictness issue

    - by JakeTheSnake
    I'm currently trying to search directories for any file labelled "??.??.????.xls" (for mm.dd.yyyy.xls). The problem I have is that the code I'm using also matches filenames such as "my-restaurant.12.01.2006.xls". I only want to match filenames with specifically the notation I used above. Dim Invoices As FileSearch Set Invoices = Application.FileSearch With Invoices .Filename = "??.??.????.xls" ' invDir is a directory I chose earlier on .LookIn = invDir .SearchSubFolders = True .MatchTextExactly = True End With Is there something I'm missing? I know I could do yet another check in my code elsewhere to make sure the filename's length is 14 characters, but is there a parameter I'm not considering in the FileSearch?

    Read the article

  • Word 2007 macros: is there an OnPrint event I can attach a macro to?

    - by notnot
    I'm looking to do a formatting check on word files before they get sent to the printer and it needs to be completely transparent to the user (no extra controls, just using the standard print options available through the UI). Is there an OnPrint or BeforePrint event, or something that can be used in that respect which I could attach a macro to, the same way I can with Open, Close, or Save? This feels like it should be simple... but those are famous last words. Thanks in advance, Rob

    Read the article

  • word macro to save a selected range into database.

    - by Thunder
    Is there a way in word to save a selected portion into the database as range object.So that we can later retrieve it . It is required to generate a report in word ,the section needs to be repeated many times. I have searched net for quite some time but not much material is found. thanks.

    Read the article

  • Why can't I get properties from members of this collection?

    - by Lunatik
    I've added some form controls to a collection and can retrieve their properties when I refer to the members by index. However, when I try to use any properties by referencing members of the collection I see a 'Could not set the ControlSource property. Member not found.' error in the Locals window. Here is a simplified version of the code: 'Add controls to collection' For x = 0 To UBound(tabs) activeTabs.Add Item:=Form.MultiPage.Pages(Val(tabs(x, 1))), _ key:=Form.MultiPage.Pages(Val(tabs(x, 1))).Caption Next x 'Check name using collection index' For x = 0 To UBound(tabs) Debug.Print "Tab name from index: " & activeTabs(x + 1).Caption Next x 'Check name using collection members' For Each formTab In activeTabs Debug.Print "Tab name from collection: " & formTab.Caption Next formTab The results in the Immediate window are: Tab name from index: Caption1 Tab name from index: Caption2 Tab name from collection: Tab name from collection: Why does one method work and the other fail? This is in a standard code module, but I have similar code working just fine from within form modules. Could this have anything to do with it?

    Read the article

  • Outlook Macro to Search

    - by Corpa Loom
    What's the best way to automate this function? I want to be able to do this in Outlook 2010, (1)select a specific mail account (2)Key in a folder that I am looking for (3)Then have the macro/program fire off an "*" asterisk (4)Then insert the text that I keyed in step one. I am trying to automate the search for a folder hot-keys that already exist. My problem is that I can't type the folder that I am looking for fast enough and all the search programs that I have used are far too slow. The hot-key search is awesome and super fast, I just can't type the folder that I am looking for fast enough. Can this process be automated? And I can't use this code, it is far too slow: http://www.vboffice.net/sample.html?mnu=2&smp=82&cmd=showitem&lang=en

    Read the article

  • Named Range Breaks Code

    - by Daniel
    I have one workbook with several sheets. I populate the listboxes (pulling static data from cells) on the 2nd sheet, click a button and it runs fine. When I populate the listboxes with a named range, the listbox populates the way I want, but I get an error because the code thinks that I didn't select anything in the listbox, even though I did. So it passes through "" instead of "title". Is this a common issue? The named range isn't a problem because it passes through the data to the listbox and I know it's selecting data because as soon as the listbox loses focus, it spits out the contents of the cell into cell A1. What's even stranger is that I have the contents of the listbox set to Msg1. So A1 gets populated with Msg1 (what I actually selected in the listbox). But when I try and use Msg1 in the code, it tells me that Msg1 is "". Again, this only happens when I use the dynamic named range, not with static data in cells K1:K9. Private Function strEndSQL1 As String Dim strSQL As String strSQL = "" 'Create SQL statement strSQL = "FROM (SELECT * FROM dbo.Filter WHERE ID = " & TextBox1.Text & " And Source IN (" & Msg1 & ")) a FULL OUTER JOIN " strSQL = strSQL & "(SELECT * FROM dbo.Filters WHERE ID = " & TextBox2.Text & " And Source IN (" & Msg1 & ")) b " strSQL = strSQL & "ON a.Group = b.Group strEndSQL = strSQL End Function

    Read the article

  • IN 'mytextfile.txt' syntax - access

    - by I__
    i would like to use this syntax to update a table in access based on data from a txtfile. fenton in his comments on this answer: http://stackoverflow.com/questions/2992168/read-text-file-line-by-line-and-insert-update-values-in-table/2992337#2992337 said that this is possible and i would like to see the exact syntax please

    Read the article

  • finding the maximum in series

    - by peril brain
    I need to know a code that will automatically:- search a specific word in excel notes it row or column number (depends on data arrangement) searches numerical type values in the respective row or column with that numeric value(suppose a[7][0]or a[0][7]) it compares all other values of respective row or column(ie. a[i][0] or a[0][i]) sets that value to the highest value only if IT HAS GOT NO FORMULA FOR DERIVATION i know most of coding but at a few places i got myself stuck... i'm writing a part of my program upto which i know: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.IO; using System.Threading; using Microsoft.Office.Interop; using Excel = Microsoft.Office.Interop.Excel; Excel.Application oExcelApp; namespace a{ class b{ static void main(){ try { oExcelApp = (Excel.Application)System.Runtime.InteropServices.Marshal.GetActiveObject("Excel.Application"); ; if(oExcelApp.ActiveWorkbook != null) {Excel.Workbook xlwkbook = (Excel.Workbook)oExcelApp.ActiveWorkbook; Excel.Worksheet ws = (Excel.Worksheet)xlwkbook.ActiveSheet; Excel.Range rn; rn = ws.Cells.Find("maximum", Type.Missing, Excel.XlFindLookIn.xlValues, Excel.XlLookAt.xlPart,Excel.XlSearchOrder.xlByRows, Excel.XlSearchDirection.xlNext, false, Type.Missing, Type.Missing); }}} now ahead of this i only know tat i have to use cell.value2 ,cell.hasformula methods..... & no more idea can any one help me with this..

    Read the article

  • search for the maximum

    - by peril brain
    I need to know a code that will automatically:- search a specific word in excel notes it row or column number (depends on data arrangement) searches numerical type values in the respective row or column with that numeric value(suppose a[7][0]or a[0][7]) it compares all other values of respective row or column(ie. a[i][0] or a[0][i]) sets that value to the highest value only if IT HAS GOT NO FORMULA FOR DERIVATION i know most of coding but at a few places i got myself stuck... i'm writing a part of my program upto which i know: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.IO; using System.Threading; using Microsoft.Office.Interop; using Excel = Microsoft.Office.Interop.Excel; Excel.Application oExcelApp; namespace a{ class b{ static void main(){ try { oExcelApp = (Excel.Application)System.Runtime.InteropServices.Marshal.GetActiveObject("Excel.Application"); ; if(oExcelApp.ActiveWorkbook != null) {Excel.Workbook xlwkbook = (Excel.Workbook)oExcelApp.ActiveWorkbook; Excel.Worksheet ws = (Excel.Worksheet)xlwkbook.ActiveSheet; Excel.Range rn; rn = ws.Cells.Find("maximum", Type.Missing, Excel.XlFindLookIn.xlValues, Excel.XlLookAt.xlPart,Excel.XlSearchOrder.xlByRows, Excel.XlSearchDirection.xlNext, false, Type.Missing, Type.Missing); }}} now ahead of this i only know tat i have to use cell.value2 ,cell.hasformula methods..... & no more idea can any one help me with this..

    Read the article

  • finding the maximum in the range

    - by comfreak
    I need to know a code that will automatically:- search a specific word in excel notes it row or column number (depends on data arrangement) searches numerical type values in the respective row or column with that numeric value(suppose a[7][0]or a[0][7]) it compares all other values of respective row or column(ie. a[i][0] or a[0][i]) sets that value to the highest value only if IT HAS GOT NO FORMULA FOR DERIVATION i know most of coding but at a few places i got myself stuck... i'm writing a part of my program upto which i know: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.IO; using System.Threading; using Microsoft.Office.Interop; using Excel = Microsoft.Office.Interop.Excel; Excel.Application oExcelApp; namespace a{ class b{ static void main(){ try { oExcelApp = (Excel.Application)System.Runtime.InteropServices.Marshal.GetActiveObject("Excel.Application"); ; if(oExcelApp.ActiveWorkbook != null) {Excel.Workbook xlwkbook = (Excel.Workbook)oExcelApp.ActiveWorkbook; Excel.Worksheet ws = (Excel.Worksheet)xlwkbook.ActiveSheet; Excel.Range rn; rn = ws.Cells.Find("maximum", Type.Missing, Excel.XlFindLookIn.xlValues, Excel.XlLookAt.xlPart,Excel.XlSearchOrder.xlByRows, Excel.XlSearchDirection.xlNext, false, Type.Missing, Type.Missing); }}} now ahead of this i only know tat i have to use cell.value2 ,cell.hasformula methods..... & no more idea can any one help me with this..

    Read the article

  • Inserting equation numbers macro

    - by krzych
    I want to insert equations into Word 2010. I'm inserting the center-aligned equations and then want to add a number to the same line, which will be aligned to the right hand side of the page. I'm having a problem with setting the alignment of the number to the right with equation aligned to center. My code is currently only inserting the number without the correct alignment: Sub EqnNumber() Selection.TypeText Text:="(" Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, _ Text:="STYLEREF \s ""Naglówek 1"" ", PreserveFormatting:=True Selection.TypeText Text:="." Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, _ Text:="SEQ Rysunek \* ARABIC \s 1", PreserveFormatting:=True Selection.TypeText Text:=")" End Sub

    Read the article

  • Concatenation yields error with underscore

    - by Daniel
    I am trying to create a macro that brings in the name of the sheet and combine it with text. For example, for sheet one, I want it to say "ThisIs_Sheet1_Test" in I5 of Sheet1. There are several sheets but it should work for all of them. What is wrong with my code? I think the underscore might be ruining it all. Here's what I have: Dim SheetName As String Public Sub CommandButton1_Click() SheetName = ActiveSheet.Name Sheets("Sheet1").Range("I5", "I5") = ThisIs_" & SheetName.text & "_Test Sheets("Sheet2").Range("H5", "H5") = ThisIs_" & SheetName.text & "_Test Sheets("Sheet3").Range("G5", "G5") = ThisIs_" & SheetName.text & "_Test End Sub

    Read the article

  • Return Empty String as NULL

    - by Daniel
    I have a listbox select and I want when the user selects null for the empty string it produces to pull the nulls from the SQL table. Here's what I have now. Blank strings return nothing because there are no empty fields in the table. SELECT * FROM dbo.Table WHERE ID = " & TextBox2.Text & " and And Field1 IN (" & Msg1 & ") How do I code that?

    Read the article

  • Create Macro With Several Variables

    - by Daniel
    I have several worksheets with similar code, so I'd like to turn it into a macro. My only problem is that there are several variables. So at certain points the code looks like this: Dim Msg_1 As String Dim Msg_2 As String Public Sub ListBox1_LostFocus() ListBox1.Height = 15 With ListBox1 Msg1 = "'" For i = 0 To .ListCount - 1 If .Selected(i) Then Msg1 = Msg1 & .List(i) & "','" End If Next i End With Msg1 = Left(Msg1, Len(Msg1) - 2) Sheets("Sheet1").Range("R3", "R3") = Msg1 End Sub and so on. How can I pass in a new value for Msg1, Msg2, Msg3 for each worksheet?

    Read the article

  • MS Access Can't move to a different record?

    - by user986706
    Ok, I'm really baffled. Here's the rundown: I've created a form with a subform. The main form is called FacilityInfo, and the subform is called BillingInfo. The forms are linked via 3 fields, AffiliateID, ClientID, and FacilityID. the subform shows one record at a time, set to show Continuous Forms, and AllowAdditions = No I can see that there are 4 records in the nav bar. But Access won't let me move off the first record. I've tried setting to Single Form. I've tried AllowAdditions = Yes. I do have a Vertical Scroll bar on the subform. It will allow me to scroll through the records, but I can only see them. I cannot move to one of the controls. Any ideas? I'm freakin' out! Thanks in advance!

    Read the article

  • How to define large list of strings in Visual Basic

    - by Jenny_Winters
    I'm writing a macro in Visual Basic for PowerPoint 2010. I'd like to initialize a really big list of strings like: big_ol_array = Array( _ "string1", _ "string2", _ "string3", _ "string4" , _ ..... "string9999" _ ) ...but I get the "Too many line continuations" error in the editor. When I try to just initialize the big array with no line breaks, the VB editor can't handle such a long line (1000+) characters. Does anyone know a good way to initialize a huge list of strings in VB? Thanks in advance!

    Read the article

  • How do I prevent Excel from locking files by default?

    - by Andrzej Doyle
    When I double-click on a CSV file on a network share, the file is opened in Microsoft Excel (which is what I want). However, Excel assumes that I'm going to modify the file, and that everyone else is too, and so puts a lock on it. In practice I very rarely actually want to modify these files, merely read from them. And if I have the file open in an Excel window in the background, it stops anyone else from opening the same file. I am aware that I can manually open a file as read-only from the File - Open dialog within Excel. However I almost always open files by double-clicking on them in Explorer (or Outlook, for attachments). Is it possible to change the file association so that the default handler for CSV files is "Excel in read-only mode"? Is there a command-line argument that I can use in the Open With... dialog to achieve this? Or more bluntly - when I am looking at a CSV file in Windows Explorer, is there an easier way to open it read-only than starting up Excel myself, selecting File - Open, choosing "read only" from the dropdown, manually navigating to the same folder in the hierarchy, and then opening the file? (I am happy to have to jump through hoops on the rare occasions that I want to modify and save a file.)

    Read the article

< Previous Page | 52 53 54 55 56 57 58 59 60 61 62 63  | Next Page >