Search Results

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

Page 47/192 | < Previous Page | 43 44 45 46 47 48 49 50 51 52 53 54  | Next Page >

  • Cannot loop through Excel 2003 files in SSIS 2008

    - by Techspirit
    Hi, I am trying to execute a SSIS 2008 package on a 64-bit OS and import Excel 2003 files to SQL Server 2008. I have created an OLEDB Connection to the Excel file with a Connection String that retrieves the Excel file from a variable, inside the ForEach Loop Container. The Run64BitRunTime is set to false. I am not able to edit the SQL Command on the OLEDB Source in the Data Flow task. It returns an error : Error 2 Validation error. Load List Staged Table: Load List Staged Table: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager "List OLEDB to Excel" failed with error code 0xC0202009. There may be error messages posted before this with more information on why the AcquireConnection method call failed. 0 0 Appreciate any help.

    Read the article

  • Overriding events of excel sheet using VBA

    - by Rashmi Pandit
    Hi, I need to programmatically override the following events of a worksheet: BeforeDoubleClick SelectionChange BeforeRightClick I have been able to override the OnActivate event using the following code: sheet.OnSheetActivate = "MyOwn_Activate" Private Sub MyOwn_Activate() myForm.Show End Sub I have implemented BeforeDoubleClick on similar lines: sheet.OnDoubleClick = "My_BeforeDoubleClick" Private Sub My_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) ... End Sub However, an 'argument not optional' error is thrown at run-time when user double clicks a cell on the sheet. Can someone please suggest how should I pass the paramters? In addition, I am not able to find event names for SelectionChange & BeforeRightClick. I tried: sheet.BeforeRightClick = "My_BeforeRightClick" sheet.SelectionChange = "My_SelectionChange" But, both the above lines do not work. Any help/ suggestion is greatly appreciated. Thanks :)

    Read the article

  • VBA: How to refer to the right worksheet

    - by stanigator
    Sub Macro1() ' ' Macro1 Macro ' ' Worksheets("Drop-down").Select n = Cells(1, 1).End(xlDown).Row For i = 1 To n ActiveSheet.Cells(i, 2).Select If Worksheets("Misc").Cells(2, i).Value <> "" Then If Worksheets("Misc").Cells(3, i).Value <> "" Then Set validationRange = Range(Worksheets("Misc").Cells(2, i), Worksheets("Misc").Cells(2, i).End(xlDown)) Else Set validationRange = Worksheets("Misc").Cells(2, i) End If With Selection.Validation .Delete .Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _ xlBetween, Formula1:=validationRange.Address .IgnoreBlank = True .InCellDropdown = True .InputTitle = "" .ErrorTitle = "" .InputMessage = "" .ErrorMessage = "" .ShowInput = True .ShowError = True End With End If Next i End Sub The lines after ActiveSheet.Cells(i,2).select within the for loop is not referring to the correct worksheet I want when I rechecked the settings for the validation drop-down menu. What is the easiest way of correcting this setback? Thanks in advance.

    Read the article

  • VBA regex pattern

    - by KeyMs92
    This is probably a simple problem, but unfortunately I wasn't able to get the results I wanted... Say, I have the following line: "Wouldn't It Be Nice" (B. Wilson/Asher/Love) I would have to look for this pattern: " (<any string>) In order to retrieve: B. Wilson/Asher/Love I tried something like "" (([^))]*)) but it doesn't seem to work. Also, I'd like to use Match.Submatches(0) so that might complicate things a bit because it relies on brackets...

    Read the article

  • Excel VBA: Sum invoice by client id with copying result to new worksheet

    - by Melkior
    Hi, i have strange problem doing reporting: i have numerous clients with different issued invoices. Problem comes to the point when there are invoices in minus and plus: Column A consists of client unique IDs, Column B invoice number, column C invoice amount A | B | C 0010019991 | 1800149471 | 162.00 | 2010-03-12 0010019991 | 1800136388 | 162.00 | 2010-02-12 0010019991 | 1600008004 | -36.00 | 2010-03-15 0010021791 | 1800132148 | 162.00 | 2010-03-12 0010021791 | 1800145436 | 162.00 | 2010-02-12 0010021791 | 1600007737 | -12.00 | 2010-03-15 0014066147 | 1800119068 | 1,684.80 | 2010-03-12 0014066147 | 1800123702 | 1,684.80 | 2010-02-12 0014066147 | 1600007980 | -1,300.80 | 2010-02-15 0014066147 | 1600007719 | -1,286.40 | 2010-03-15 I need to remove rows with negative invoices in a way that amount is summed with invoices which are not with negative amount. So that final result would look like: A | B | C | D 0010019991 | 1800149471 | 126.00 | 2010-03-12 0010019991 | 1800136388 | 162.00 | 2010-02-12 0010021791 | 1800132148 | 150.00 | 2010-03-12 0010021791 | 1800145436 | 162.00 | 2010-02-12 0014066147 | 1800123702 | 782.40 | 2010-02-12

    Read the article

  • Macro VBA to get selected text in Outlook 2003

    - by balalakshmi
    I am trying to use this code snippet to get the selected text in outlook 2003 Sub SelectedTextDispaly() On Error Resume Next Err.Clear Dim oText As TextRange ''# Get an object reference to the selected text range. Set oText = ActiveWindow.Selection.TextRange ''# Check to see whether error occurred when getting text object ''# reference. If Err.Number <> 0 Then MsgBox "Invalid Selection. Please highlight some text " _ & "or select a text frame and run the macro again.", _ vbExclamation End End If ''# Display the selected text in a message box. If oText.Text = "" Then MsgBox "No Text Selected.", vbInformation Else MsgBox oText.Text, vbInformation End If End Sub When running this macro I get the error --------------------------- Microsoft Visual Basic --------------------------- Compile error: User-defined type not defined Do I need to add any references to fix this up?

    Read the article

  • Changing a datatype solely for the purpose of Excel Export in Crystal Reports

    - by yeahumok
    I have a report that has several numerical fields. To fill a project requirement, i had to use the following formula: if {DataTable1.No of Investments}>9999 then '*****' else toText({DataTable1.No of Investments},0) Basically, if the number fed in is bigger than 9999 it turns into * on the report. Now, when i try to export into excel, not only is the data type for all fields, strings...but the * show up versus numbers. I was wondering if there was a way to re-cast this back into a numerical value SOLELY for the purpose of excel exportation so that i'd be able to use excel formulas as well as see numbers instead of asterisks. I'd only be doing data-only excel exports. Any ideas?

    Read the article

  • How to read more than 256 columns from an excel file (2007 format) using OLEDB

    - by Nan T
    I'm trying to import a excel file with more than 256 columns using OLEDB in C#. I tried all kinds of things, but it doesn't seem to be possible to read more than 256 columns from a excel (2007 format) file. I'm wondering if it's a bug or I'm simply missing something. Here is the connection string I used: Provider=Microsoft.ACE.OLEDB.12.0;Data Source=c:\myFolder\myExcel2007file.xlsx;Extended Properties="Excel 12.0

    Read the article

  • C# Excel Exception

    - by Andrew James Watt
    I am trying to copy all data from worksheet1 and paste the values into worksheet2 at the same position I am using office 2003 and the Interlop library. Here is my code; public void CreateExcelWorksheet() { Microsoft.Office.Interop.Excel.Application xlApp = new Microsoft.Office.Interop.Excel.Application(); if (xlApp == null) { Console.WriteLine("EXCEL could not be started. Check that your office installation."); return; } xlApp.Visible = true; Workbook wb = xlApp.Workbooks.OpenXML(@"C:\XML_Export.xml", Type.Missing, 2); Worksheet worksheet1 = wb.Worksheets[1] as Worksheet; Worksheet worksheet2 = wb.Worksheets[2] as Worksheet; worksheet1.UsedRange.Copy(Type.Missing); worksheet2.PasteSpecial(Microsoft.Office.Interop.Excel.XlPasteType.xlPasteValues, false, false, Type.Missing, Type.Missing, Type.Missing, Type.Missing); } For some reason after the paste command the following exception occurs: Exception from HRESULT: 0x800A03EC Could anyone help?

    Read the article

  • Referencing Excel Sheets with JET Driver Sheets Are Duplicated with Underscores

    - by MasterMax1313
    I'm referencing an excel document with the JET database driver, which was working just fine until one day the application failed. Upon further investigation I noticed that the tabs were duplicated in some instances (all tabs actually) - i.e. Tab1$ and Tab1$_. I've researched this issue and found that it is caused by the user applying a filter. Now the filters have been removed, no special formatting, frozen panes, or print formats, but still I have these tabs duplicated. Normally I'd code around this, but since we're in a code freeze I need to come up with an Excel based solution. I want to get rid of those crazy underscored tab names / reverences. I could probably run a program to clean up the file if necessary, to send it back to the users, but I want to explore Excel options first. Thoughts? I have Excel 2010, and access to any other version as well.

    Read the article

  • How to remove a specific category on a selected mail in Outlook 2003 with Macro?

    - by szekelya
    Hi, I am trying to transform my Outlook2003 into the closest thing to gmail. I started to use categories, which are pretty similar to labels in gmail. I can assign categories automatically with rules, and I can add categories manually. I have also created "search folders", that show all mails with a given category, if they are not in the Deleted Items or Sent Items folders. This part is almost like the Label views in gmail. Two things are missing basically, which should be done with macros (VBA to be precise) which I'm totally inexperienced with. So hence my questions: -Can someone show me a macro to remove the category "Inbox"? That would act exactly like the Archive button in gmail. In fact I want to assign this macro to a toolbar button and call it Archive. I have a rule that adds the Inbox category to all incoming mail. As I said, I have a search folder displaying all mails categorized as Inbox, and I also have an All Mail search folder, that displays all messages regardless whether they have the Inbox category. Exactly like gmail, just the easy archiving is missing. -Can someone show me a macro that would delete the selected mail/mails and also would remove the Inbox category before deletion? I would replace the default delete button with this macro. (Somewhat less important, as in my search folders I can filter messages that are physically placed in the Deleted Items folder, but it would be more elegant not to have mails categorized as Inbox in the trash. Many thanks in advance, szekelya

    Read the article

  • ADOMD & Excel Integration

    - by koumides
    All, We have an Excel spreadsheet that uses ADOMD to query OLAP cubes and present the data in Excel. We are using version 2.8 at the moment of the ADOMD API. As far as I know there is an ADOMD.NET API for querying OLAP cubes. Can this new .NET version used from inside Excel ? Many Thanks, MK

    Read the article

  • IF Statement in VBA

    - by Edmond
    How would I code a IF statement if I was trying to say IF the date today is equal to Monday THEN Have Outlook prepare 3 emails ELSE Have Outlook prepare 2 emails END IF I just need help setting up the "IF the date today is equal to Monday." How would that code look.

    Read the article

  • Excel VBA pass array of arrays to a function

    - by user429400
    I have one function that creates an array of arrays, and one function that should get the resulting array and write it to the spreadsheet. I don't find the syntax which will allow me to pass the array of arrays to the second function... Could you please help? Here is my code: The function that creates the array of arrays: Function GetCellDetails(dict1 As Dictionary, dict2 As Dictionary) As Variant Dim arr1, arr2 arr1 = dict1.Items arr2 = dict2.Items GetCellDetails = Array(arr1, arr2) End Function the function that writes it to the spreadsheet: Sub WriteCellDataToMemory(arr As Variant, day As Integer, cellId As Integer, nCells As Integer) row = CellIdToMemRow(cellId, nCells) col = DayToMemCol(day) arrSize = UBound(arr, 2) Range(Cells(row, col), Cells(row + arrSize , col + 2)) = Application.Transpose(arr) End Sub The code that calls the functions: Dim CellDetails CellDetails = GetCellDetails(dict1, dict2) WriteCellDataToMemory CellDetails, day, cellId, nCells Thanks, Li

    Read the article

  • Adding multiple links in VBA

    - by Edmond
    When I try and create both of the files as links within the outlook email, only one of the files shows up as a link. How can I resolve this so both will show up as links. Set omail = CreateItem(olMailItem) With omail .Subject = "Key Report" .BodyFormat = olFormatHTML .HTMLBody = "<a href ='" & fileL & "'>Key Report</a>" .HTMLBody = "<a href ='" & fileSat & "'>Key Report Saturday</a>" .To = [email protected] .Display End With

    Read the article

  • How to use VBA to colour pie chart

    - by Timon Heinomann
    I have the following code in which the code tries to create a bubble chart with pie charts as the bubbles. As in this version colour themes are used to create a different colour in each pie chart (bulbble) in the function part I have the problem that it works depending on the paths to the colour paletts. Is there an easy way to make the function in a way that it works independently of those paths either by coding a colour for each pie chart segment or by using standardize paths (probably not possible, not preferable). Sub PieMarkers() Dim chtMarker As Chart Dim chtMain As Chart Dim intPoint As Integer Dim rngRow As Range Dim lngPointIndex As Long Dim thmColor As Long Dim myTheme As String Application.ScreenUpdating = False Set chtMarker = ActiveSheet.ChartObjects("chtMarker").Chart Set chtMain = ActiveSheet.ChartObjects("chtMain").Chart Set chtMain = ActiveSheet.ChartObjects("chtMain").Chart Set rngRow = Range(ThisWorkbook.Names("PieChartValues").RefersTo) For Each rngRow In Range("PieChartValues").Rows chtMarker.SeriesCollection(1).Values = rngRow ThisWorkbook.Theme.ThemeColorScheme.Load GetColorScheme(thmColor) chtMarker.Parent.CopyPicture xlScreen, xlPicture lngPointIndex = lngPointIndex + 1 chtMain.SeriesCollection(1).Points(lngPointIndex).Paste thmColor = thmColor + 1 Next lngPointIndex = 0 Application.ScreenUpdating = True End Sub Function GetColorScheme(i As Long) As String Const thmColor1 As String = "C:\Program Files\Microsoft Office\Document Themes 15\Theme Colors\Blue Green.xml" Const thmColor2 As String = "C:\Program Files\Microsoft Office\Document Themes 15\Theme Colors\Orange Red.xml" Select Case i Mod 2 Case 0 GetColorScheme = thmColor1 Case 1 GetColorScheme = thmColor2 End Select End Function The code copies a single chart again and again on the bubbles. So I woudl like to alter the Function (now called Get colourscheme) into a fucntion that assigns a a unqiue rgb colour to each segment of each pie chart

    Read the article

  • Problem with writing a file to excel with spreadsheet

    - by winter sun
    I am trying to write excel file by using ruby 1.9 spreadsheet version 0.6.4.1 on windows. Everything is going ok, until I get to the book.write statement when I write book.write "c:/spreadsheet/excel-file.xls I keep getting the following error No such file or directory - c:/spreadsheet/excel-file.xls Can anyone tell me what I should change in this path name?

    Read the article

  • How to get named excel sheets while exporting from SSRS

    - by rao
    Whenever a single page report is exported to excel, sheet in excel is named by the report name. If a report has multiple pages, the sheets are named as sheet1, sheet2,.... Is there any way to specify sheet names in SSRS 2005 ? solution: Found this after some googleing: Changing the Sheet names in SQL Server RS Excel: QnD XSLT Will try out and post an update if it works.

    Read the article

  • Create Excel files from C# without office

    - by tbischel
    I am writing a program that generates excel reports, currently using the Microsoft.Interop.Excel reference. My dev computer has Excel on it, but the end user may or may not have Office installed. Will this tool fail if Office isn't installed on the end users computer, or is this interop service separate from the actual application?

    Read the article

  • Excel Spreadsheet - Best way to perform an Oracle Query on a cell

    - by Jamie
    Hi there, I have an Excel Spreadsheeet. There is a cell containing a concatenated name and surname (don't ask why), for example: Cell A2 BLOGGSJOE On this cell, I would like to run the following SQL and output it to cell A3, A4 and A5 SELECT i.id, i.forename, i.surname FROM individual i WHERE UPPER(REPLACE('" & A2 & "', ' ', '')) = UPPER(REPLACE(i.surname|| i.forename, ' ', '')) AND NVL(i.ind_efface, 'N') = 'N' Any idea how I could perform an oracle query on each cell and return the result? I have enabled an oracle datasource connection in Excel, just not sure what to do now. Is this a stupid approach, and can you recommend a better more proficient way? Thanks muchly! I lack the necessary experience in this type of thing! :-) EDIT: I am aware that I could just write a simple ruby/php/python/whatever script to loop through the excel spreadsheet (or csv file), and then perform the query etc. but i thought there might be a quick way in excel itself.

    Read the article

  • Excel workbooks produced by POI don't work when linked

    - by Eric Nicolas
    Here is what I'm doing : Create a workbook in memory (book = new HSSFWorkbook(), ...) Save it to disk (book.write(...)) Open in Excel (ok) Create another workbook in Excel, which links to the first one (=PoiWorkbook?xls!A1) Close Excel Then everytime I open the second workbook again, all the links are #N/A, unless I also open the POI-generated workbook at the same time. I never saw this behaviour with standard workbooks created in Excel. Anyone has seen this and found a workaround ? Thanks.

    Read the article

  • Weird bug on powerpoint vba

    - by asksuperuser
    I have a "mynote" textbox on a slide. If I execute: Sub test() If ActiveWindow.Selection.SlideRange.Shapes("mynote").Visible Then MsgBox "ok" End If end sub It works. But If I attach a shape with this macro: Sub test(oShape As Shape) If ActiveWindow.Selection.SlideRange.Shapes("mynote").Visible Then MsgBox "ok" End If end sub It doesn't work (no error message, no "ok" message)

    Read the article

< Previous Page | 43 44 45 46 47 48 49 50 51 52 53 54  | Next Page >