Search Results

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

Page 35/48 | < Previous Page | 31 32 33 34 35 36 37 38 39 40 41 42  | Next Page >

  • Fastest way to get an Excel Range of Rows

    - by gayan
    In a VSTO C# project I want to get a range of rows from a set of row indexes. The row indexes can be for example like "7,8,9,12,14". Then I want the range "7:9,12,14" rows. I now do this: Range rng1 = sheet.get_Range("A7:A9,A12,A14", Type.Missing); rng1 = rng1.EntireRow; But it's a bit inefficient due to string handling in range specification. sheet.Rows["7:9"] works but I can't give this sheet.Rows["7:9,12,14"] // Fails

    Read the article

  • Updating MS - Access fields through MS-Excel cells

    - by SpikETidE
    Hi everyone.... Consider that i have an excel workbook and an access table not necessarily having a similar structure (i.e. They may not have same number of columns) When i open the workbook the rows in the excel sheet get populated by the rows in access table (copied from the access table into the excel sheet's particular range of cells specified using macros). Then i modify certain cells in the excel sheet. I also have a button called "Save" in the excel sheet. When pressed, this will execute a macro. My question how can i update the access table to reflect the changes in the excel sheet when the save button is clicked...? Thanks for your time and suggestions...!

    Read the article

  • import text file containing line breaks into excel

    - by Maximilian Tyrtania
    I have a plain text file looking like this: "some text containing line breaks" I'm trying to talk excel 2004 (Mac, v.11.5) into opening this file correctly. I'd expect to see only one cell (A1) containing all of the above (without the quotes)... But alas, I can't make it happen, because Excel seems to insist on using the CR's as row delimiters, even if I set the text qualifier to double quote. I was sort of hoping that Excel would understand that those line breaks are part of the value - they are embedded in double quotes which should qualify them as part of the value. So my Excel sheet has 5 rows, which is not what I want. I also tried this Applescript to no avail: tell application "Microsoft Excel" activate open text file filename ¬ "Users:maximiliantyrtania:Desktop:linebreaks" data type delimited ¬ text qualifier text qualifier double quote ¬ field info {{1, text format}} ¬ origin Macintosh with tab end tell If I could tell Excel to use a row delimiter other than CR (or LF), well, I'd be a happy camper, but excel seems to allow the change of the field delimiter only, not the row delimiter. Any pointers? Thanks, Max Excel's open

    Read the article

  • Autofiltered List; cross-row formula

    - by Chris Gunner
    I have a large Autofiltered list (~600 rows), with some of the rows being summary rows that I want to use a UDF to display the lowest priority listed in any of the 'child' cells. I can pass to my formula the right cells, but they are no longer correct if the list is re-ordered in any way. Is there a way to give the formula the right cell and have it recognise that I want that row and only ever that row? I can do it with a VLOOKUP to look at a hidden column that lists wether the 'child' row matches the right criteria, but with 600 rows and each parent row requiring about a dozen 'child' cells each, it's too slow.

    Read the article

  • Assigning a previous fieldvalue to a field in the next record

    - by user2945849
    I am working on a loan amortization schedule using Access, I have created the following tables: tblMembers - autoMemberID|txtLN|txtFN|etc tblLoans - autoLoanID|numMemberID|etc tblSchedules -autoScheduleID|numLoanID|numPayment#|datDue|dblBegin|...|dblEnd tblPayments - autoPaymID|numLoanID|curAmtPaid|datPaidDate and forms: frmLoans - autoLoanID|etc sbfSchedules - numPaymID|datDue|dblBegin|...|dblEnd sbfPayments - dblAmount|datPaid I have been able to generate the schedule (using DAO recordset) clicking a btnRepaymentSchedule the challenge is when I click a btnAddPayment still on the sbfSchedules, I want the value of the dblEnd field to be the value of the next record dblBegin field! I have tried using dlookup(txtBeginBalance = Dlookup("EndBalance", _ "Schedules","[ScheduleID] = Form![Schedules]![ScheduleID]-1) but there is no effect but if I use txtBeginBalance = txtEndBalance the value of txtEndBalance is assigned to the value of txtBeginBalance of the same record (want next record). Secondly, how can I set focus to the next record if a contro(txtAmountPaid) is not null on clicking the btnAddPayment or assigning the value of a calculation when the control is 0 or null ? Thanks

    Read the article

  • How do I detect a Word table with (horizontally) merged cells?

    - by Reuben
    When a Word table contains horizontally merged cells, accessing aTable.Columns.First or performing a For Each over aTable.Columns will result in an error. Is there a way to determine if a table contains horizontally merged cells without resulting in an error? I've read Determine if a Word cell is merged, but that is about detecting if a particular Word table cell is merged, rather than does the whole table have any merged cells.

    Read the article

  • Access.Application.CurrentDb is Nothing?

    - by Allain Lalonde
    I'm at a loss to explain this one: I'm getting an error "91" (Object or With block not set) on the second line below: Dim rs As DAO.Recordset Set rs = CurrentDb.OpenRecordset("SELECT * FROM employees") The following also causes it: Set rs = CurrentDb.OpenRecordset("employees") Executing ?CurrentDb.Name alone in the immediate window causes the error as well. Now, clearly the database is open since I'm editing the form within it, so what can cause this error here?

    Read the article

  • ms-access: a folder listener?

    - by every_answer_gets_a_point
    i don't know if this is the standard way to do things, but i will need to take a text file and have it imported into access. i need access to be always looking (or every minute or so) in a folder, importing the text file, and then automatically printing a report is this possible? how do i have access look in a folder every couple of minutes and open a text file if it finds one?

    Read the article

  • Programmatically Determine If An Excel File (.xls) Contains Macros

    - by Gkakk McJkakk
    Is there any way to programmatically determine if an .xls contains macros, without actually opening it in Excel? Also are there any methods to examine which certificate (including timestamp cert) these macros are signed with? Again without using Excel. I'm wondering in particular if there are any strings that always show up in the raw data of an Excel file when macros are present.

    Read the article

  • clearing an entire column in access

    - by I__
    is there a way to clear an entire column in a datasheet in access? i can just right click on it and delete it but that will affect the structure, i just need to clear all the records. how do i do this? perhaps the question i should be asking is how do i clear the entire contents of a datasheet in access?

    Read the article

  • Conditional formatting in Access

    - by every_answer_gets_a_point
    I have a datasheet that looks like this: ID name_ 1 2 3 4 1 name1 x 0 0 0 2 name2 0 x 0 0 3 name3 0 0 x 0 4 name4 0 0 0 x I have rectangles on a report that correspond to this datasheet. When the report opens, I need the rectangles to be colored red according to the data. For example, in the name1 row where there is an x in the 1 column, I need the specific rectangle corresponding to this (name1, 1) to be colored red. Here is the result that I need: x x x x (where x is a rectangle that is red) Perhaps the best place to place this code would be in ON LOAD event of the report, but i am not sure exactly. Can you please suggest to me some code that would turn the specified rectangles red according to the data?

    Read the article

  • Excel Worksheet Index

    - by Ben
    I have the following code that works great but I am trying to modify it so that instead of replacing column 1 of the Index page with a new index I would rather start the range in Cell C11. Right now, the new Index starts in Cell A1 of the Index sheet. Here is the code: Private Sub Worksheet_Activate() Dim wSheet As Worksheet Dim l As Long l = 1 With Me .Columns(1).ClearContents .Cells(1, 1) = "INDEX" .Cells(1, 1).Name = "Index" End With For Each wSheet In Worksheets If wSheet.Name <> Me.Name Then l = l + 1 With wSheet .Range("A1").Name = "Start_" & wSheet.Index .Hyperlinks.Add Anchor:=.Range("A1"), Address:="", _ SubAddress:="Index", TextToDisplay:="Back to Index" End With Me.Hyperlinks.Add Anchor:=Me.Cells(l, 1), Address:="", _ SubAddress:="Start_" & wSheet.Index, TextToDisplay:=wSheet.Name End If Next wSheet End Sub I have successfully modified the code so that the link back to the index on each sheet is in cell A4 without trouble, but I can't figure out how to have the index be replaced starting at Cell C11

    Read the article

  • How does Access 2007's moveNext/moveFirst/, etc., feature work?

    - by Chris M
    I'm not an Access expert, but am an SQL expert. I inherited an Access front-end referencing a SQL 2005 database that worked OK for about 5000 records, but is failing miserably for 800k records... Behind the scenes in the SQL profiler & activity manager I see some kind of Access query like: SELECT "MS1"."id" FROM "dbo"."customer" "MS1" ORDER BY "MS1"."id" The MS prefix doesn't appear in any Access code I can see. I'm suspicious of the built-in Access navigation code: DoCmd.GoToRecord , , acNext The GoToRecord has AcRecord constant, which includes things like acFirst, acLast, acNext, acPrevious and acGoTo. What does it mean in a database context to move to the "next" record? This particular table uses an identity column as the PK, so is it internally grabbing all the IDs and then moving to the one that is the next highest??? If so, how would it work if a table was comprised of three different fields for the PK? Or am I on the wrong track, and something else in Access is calling that statement? Unfortunately I see a ton of prepared statements in the profiler. THanks!

    Read the article

  • ms-access: displaying column as "something else"

    - by every_answer_gets_a_point
    i have the following access sql statement: SELECT * FROM (SELECT [Occurrence Number], [Occurrence Date], [1 0 Preanalytical (Before Testing)], [Cup Type], NULL as '2 0 Analytical (Testing Phase)', [2 0 Area], NULL,NULL FROM [Lab Occurrence Form] WHERE NOT ([1 0 Preanalytical (Before Testing)] IS NULL) in this: NULL as '2 0 Analytical (Testing Phase)' when it displays the column it shows the single quote. if i remove the quote completely it gives me an error, if i use double quotes it shows me the double quotes in the resulting table is it possible to not have it show any quotes?

    Read the article

  • Unable to diligently close the excel process running in memory

    - by NewAutoUser
    I have developed a VB.Net code for retrieving data from excel file .I load this data in one form and update it back in excel after making necessary modifications in data. This complete flow works fine but most of the times I have observed that even if I close the form; the already loaded excel process does not get closed properly. I tried all possible ways to close it but could not be able to resolve the issue. Find below code which I am using for connecting to excel and let me know if any other approach I may need to follow to resolve this issue. Note: I do not want to kill the excel process as it will kill other instances of the excel Dim connectionString As String connectionString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & ExcelFilePath & "; Extended Properties=excel 8.0; Persist Security Info=False" excelSheetConnection = New ADODB.Connection If excelSheetConnection.State = 1 Then excelSheetConnection.Close() excelSheetConnection.Open(connectionString) objRsExcelSheet = New ADODB.Recordset If objRsExcelSheet.State = 1 Then objRsExcelSheet.Close() Try If TestID = "" Then objRsExcelSheet.Open("Select * from [" & ActiveSheet & "$]", excelSheetConnection, 1, 1) Else objRsExcelSheet.Open("Select Test_ID,Test_Description,Expected_Result,Type,UI_Element,Action,Data,Risk from [" & ActiveSheet & "$] WHERE TEST_Id LIKE '" & TestID & ".%'", excelSheetConnection, 1, 1) End If getExcelData = objRsExcelSheet Catch errObj As System.Runtime.InteropServices.COMException MsgBox(errObj.Message, , errObj.Source) Return Nothing End Try excelSheetConnection = Nothing objRsExcelSheet = Nothing

    Read the article

  • Excel Macro to find text in cell and insert hyperlink on cell

    - by tnriverfish
    We're managing some system bugs in a web system and setting priority for execs in a spreadsheet. Each of the tickets has a "FD-" and four numbers as the ID. The web system has a hyperlink that has that "FD-####" at the end of the link. The end result would look like this -- http://www.mytickets.com/FD-#### I'd like to run a macro that finds all the FD-#### and inserts a hyperlink on each. There may be multiple FD-#### in a single cell and there will certainly be other text in there. I'd go through each and add the link but there are over 150 or so. Thanks!

    Read the article

  • unconventional sorting in excel

    - by I__
    i have a list like this: G05 G03 F02 F06 G10 A03 A11 E10 E05 C11 C03 D03 A12 C12 F05 H03 C08 G02 D10 B12 C10 D11 C02 E11 E02 E03 H11 A08 D05 F04 A04 H07 D04 B07 F12 E04 B03 H05 C06 F08 C09 E08 G12 C04 B05 H09 A07 E09 C07 G07 G09 A06 D09 E07 E12 G04 A10 H02 G08 B06 B09 D06 F07 G06 A09 H06 D07 H04 H10 F10 B02 B10 F03 F11 D08 B11 B08 D12 H08 A05 i need it sorted in the following manner: A03, B03, C03....A04, B04, C04.....A11, B11, C11........ the conventional sort can be done like this: ActiveWorkbook.Worksheets("2871P1").Sort.SortFields.Add Key:=Range("D20:D99") _ , SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal With ActiveWorkbook.Worksheets("2871P1").Sort .SetRange Range("D20:E99") .Header = xlGuess .MatchCase = False .Orientation = xlTopToBottom .SortMethod = xlPinYin .Apply End With however with this method, we are going to get A01, A02, A03 etc..., but this is not what i need

    Read the article

  • Macro - To create one [.csv] file from/using multiple workbooks, kept in a folder, containing multi

    - by AJ
    Hello, I have more than one Excel Workbooks containing multiple worksheets in each of them. I would like to have a macro which help me to create (combine the information from) all the worksheets into one pipe [|] delimited [.csv] file. These sheets should be combined/appended into the [.csv] file, in the same order these worksbooks appear in a folder and in the order sheets appear in these workbooks. The macro should ask for a delimiter/separator specific to me and the input and output path based on my selection. It would be great if the output [.csv] file is names as "foldername" + "Output.csv" Thank you, Best Regards - AJ

    Read the article

< Previous Page | 31 32 33 34 35 36 37 38 39 40 41 42  | Next Page >