Search Results

Search found 1647 results on 66 pages for 'powerpoint vba'.

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

  • Autofilter with multi-columns in Excel VBA

    - by tlpd
    I need to use VBA to filter some information in excel. As I have an excel with 20 columns, now want to use AutoFilter function to search in some columns if it contains one value (Ex: ID010). what i want is it'll display all rows that have at least one column contains ID010. Currently, i use the below code to search. However, it could not find any data because all the criteria seem to tie together using AND operator ' Search range, [argIn]---> search value With [D5:M65536] .AutoFilter Field:=4, Criteria1:=argIn .AutoFilter Field:=5, Criteria1:=argIn .AutoFilter Field:=6, Criteria1:=argIn .AutoFilter Field:=7, Criteria1:=argIn .AutoFilter Field:=8, Criteria1:=argIn .AutoFilter Field:=9, Criteria1:=argIn .AutoFilter Field:=10, Criteria1:=argIn .AutoFilter Field:=11, Criteria1:=argIn .AutoFilter Field:=12, Criteria1:=argIn .AutoFilter Field:=13, Criteria1:=argIn End With I wonder if anyone could give me some hints or examples how to handle this issue. Thank you in advance.

    Read the article

  • XML Deserialization in VB/VBA

    - by oharab
    I have a set of VBA classes in an MS Access database. I have an xml string with data I want to create new classes with. Other than setting each property individually, is there an easy way to deserialize the XML into my object? I've seen the code using the TypeLib library Public Sub ISerializable_Deserialize(xml As IXMLDOMNode) Dim tTLI As TLIApplication Dim tInvoke As InvokeKinds Dim tName As String Dim tMem As MemberInfo tInvoke = VbLet For Each tMem In TLI.ClassInfoFromObject(Me).Members tName = LCase(tMem.Name) CallByName Me, tMem.Name, VbLet, xml.Attributes.getNamedItem(tName).Text Next tMem End Sub but this doesn't seem to work with the standard class modules. I get a 429 error: ActiveX Component Cannot Be Created Can anyone else help me out? I'd rather not have to set each propery by hand if I can help it, some of these classes are huge!

    Read the article

  • MS Access 2003 - VBA for altering a table after a "SELECT * INTO tblTemp FROM tblMain" statement

    - by Justin
    Hi. I use functions like the following to make temporary tables out of crosstabs queries. Function SQL_Tester() Dim sql As String If DCount("*", "MSysObjects", "[Name]='tblTemp'") Then DoCmd.DeleteObject acTable, "tblTemp" End If sql = "SELECT * INTO tblTemp from TblMain;" Debug.Print (sql) Set db = CurrentDb db.Execute (sql) End Function I do this so that I can then use more vba to take the temporary table to excel, use some of excel functionality (formulas and such) and then return the values to the original table (tblMain). Simple spot i am getting tripped up is that after the Select INTO statement I need to add a brand new additional column to that temporary table and I do not know how to do this: sql = "Create Table..." is like the only way i know how to do this and of course this doesn't work to well with the above approach because I can't create a table that has already been created after the fact, and I cannot create it before because the SELECT INTO statement approach will return a "table already exists" message. Any help? thanks guys!

    Read the article

  • VBA - Create ADODB.Recordset from the contents of a spreadsheet

    - by robault
    Hello, I am working on an Excel application that queries a SQL database. The queries can take a long time to run (20-40 min). If I've miss-coded something it can take a long time to error or reach a break point. I can save the results to a sheet fine, it's when I am working with the record sets that things can blow up. Is there a way to load the data into a ADODB.Recordset when I'm debugging to skip querying the database (after the first time)? Would I use something like this? http://stackoverflow.com/questions/2086234/query-excel-worksheet-in-ms-access-vba-using-adodb-recordset

    Read the article

  • MS Access Print Report using VBA

    - by LanguaFlash
    I have a very VBA intensive report. When I preview it everything is great but when I print it after previewing things go wacky. I have spent many hours narrowing down the possibilities and I have conclude with a certain level of confidence that it is a but in MS Access. Up to this point my method for printing reports was to open the report using docmd.openreport "report". I then use the docmd.printout command so that I can set the page range, collation etc. Is there a way to print a report directly and still be able to set options like page rage, collate etc without doing a preview first? Thanks, Jeff

    Read the article

  • Calling a running C# application from VBA

    - by Robert
    I have some VBA code that needs to talk to a running c# application. For what it's worth, the c# application runs as a service, and exposes an interface via .net remoting. I posted a question regarding a specific problem I'm having already (http://stackoverflow.com/questions/2556163/from-vb6-to-net-via-com-and-remoting-what-a-mess) but I think I may have my structure all wrong... So I'm taking a step back - what's the best way to go about doing this? One thing that's worth taking into account is that I want to call into the running application - not just call a precompiled DLL...

    Read the article

  • Simple variable assignment in Excel 2003 VBA

    - by Mike
    Hi, I am new to VBA in Excel. I'm setting up a simple macro Option Explicit Sub Macro1() Dim sheet sheet = Worksheets.Item(1) ' This line has the error End Sub On the line with the error, I get "Run-time error '438' Object doesn't support this property or method" I can use the Watch window to see that "Worksheets.Item(1)" is a valid object. I've tried changing it to "Dim sheet As Worksheet" but same result. Ok, so what am I missing? Why does this error occur? Thanks! -Mike

    Read the article

  • Achieve Rails-style migrations in MS Access VBA application

    - by avguchenko
    This is a simple way to do Rails-style migrations in a VBA application. Just add additional migrations like migration(name, sql_string, database) to run_migratons and call run_migrations somewhere in the beginning of your execution. Function migrate(signature As String, sql As String, dbs As DAO.database) Dim rs As DAO.Recordset Set rs = dbs.OpenRecordset("select * from versions where migration = '" & signature & "'") If rs.EOF Then dbs.Execute (sql) rs.AddNew rs("migration") = signature rs.Update End If End Function Function setup_versions(dbs As DAO.database) Dim t As DAO.TableDef On Error Resume Next Set t = dbs.TableDefs("versions") If Err.Number <> 0 Then dbs.Execute ("CREATE TABLE versions (migration text)") End If Err.Clear End Function Function run_migrations(dbs As DAO.database) setup_versions(dbs) migrate("20100315142400_create_table", "CREATE TABLE table_name (field1 type, field 2 type)", dbs) 'add migrations here' End Function

    Read the article

  • Populate new row with VBA button click

    - by AME
    Hi, I am trying to create a list that adds a new row of data each time a button is clicked. I have the following code assigned to the button when clicked: PurchaseDate = InputBox("Enter Purchase Date:") Sheets("TrackRecord").Select i = 0 Row = i + 1 Range("A2").Select ActiveCell.FormulaR1C1 = Row Range("B2").Select ActiveCell.FormulaR1C1 = "=Dashboard!R26C4*(1/Dashboard!R26C12)" Range("C2").Select ActiveCell.FormulaR1C1 = "=Dashboard!R26C2" Range("D2").Select ActiveCell.FormulaR1C1 = PurchaseDate Range("E2").Select ActiveCell.FormulaR1C1 = "=Dashboard!R26C8 + R2C4" Range("F2").Select ActiveCell.FormulaR1C1 = "=Waterfall!R[8]C[5]" Range("F2").Select Selection.AutoFill Destination:=Range("F2:I2"), Type:=xlFillDefault Range("F2:I2").Select End Sub This code works fine, but I'd like it populate the next row below instead of overwriting the same row each time the button is clicked. I know that I have to iterate through the "Range("A2").select" section, e.g. "Range("A2").select" -- "Range("B2").select" .. But I don't know how to do this in VBA for Excel. That's why I am asking you folks ; ) . Thanks,

    Read the article

  • Stop VBA Evaluate from calling target function twice

    - by Abiel
    I am having trouble getting VBA's Evaluate() function to only execute once; it seems to always run twice. For instance, consider the trivial example below. If we run the RunEval() subroutine, it will call the EvalTest() function twice. This can be seen by the two different random numbers that get printed in the immediate window. The behavior would be the same if we were calling another subroutine with Evaluate instead of a function. Can someone explain how I can get Evaluate to execute the target function once instead of twice? Thank you. Sub RunEval() Evaluate "EvalTest()" End Sub Public Function EvalTest() Debug.Print Rnd() End Function

    Read the article

  • Using a c# .net object in an Excel VBA form

    - by Mark O'G
    Hi I have a .net object that I want to use in Excel. I have an existing VBA script that i need to alter to call this the object from. I have then converted the object to a TLB. I've not really touched on this area before so any help will be appreciated. I have created an interface [Guid("0F700B48-E0CA-446b-B87E-555BCC317D74"),InterfaceType(ComInterfaceType.InterfaceIsDual)] public interface IOfficeCOMInterface { [DispId(1)] void ResetOrder(); [DispId(2)] void SetDeliveryAddress(string PostalName, string AddressLine1, string AddressLine2, string AddressLine3, string AddressLine4, string PostCode, string CountryCode, string TelephoneNo, string FaxNo, string EmailAddress); } I have also created an class that inherits that object. [ClassInterface(ClassInterfaceType.None), ProgId("NAMESPACE.OfficeCOMInterface"), Guid("9D9723F9-8CF1-4834-BE69-C3FEAAAAB530"), ComVisible(true)] public class OfficeCOMInterface : IOfficeCOMInterface, IDisposable { public void ResetSOPOrder() { } public void SetDeliveryAddress(string PostalName, string AddressLine1, string AddressLine2, string AddressLine3, string AddressLine4, string PostCode, string CountryCode, string TelephoneNo, string FaxNo, string EmailAddress) { try { SalesOrder.AmendDeliveryAddress(PostalName, AddressLine1, AddressLine2, AddressLine3, AddressLine4, PostCode); MessageBox.Show("Delivery address set"); } catch (Exception ex) { throw ex; } } }

    Read the article

  • VBA Excel: Issue with Zorder /Help with Debugging Code

    - by AME
    Hi, I have multiple shapes and checkboxes in a spreadsheet. I want to create a function that places a particular shape to front (a higher Z-order than its peers) when its corresponding checkbox is clicked. This is the code that I currently have: Sub CheckBox3_Click() If CheckBox3.Value = True Then Sheet1.Shapes("blueoval").ZOrder msoBringToFront End If End Sub I get Run-time Error '424' whenever I run this code. I am new to VBA for excel, so any help would be greatly appreciated. What's wrong with this code? What's missing? etc.. Thanks!

    Read the article

  • Excel, VBA Vlookup, multiple returns into rows

    - by Sean Mc
    Very new to VBA, so please excuse my ignorance. How would you alter the code below to return the result into rows as opposed to a string? Thanks in advance.... data Acct No CropType ------- --------- 0001 Grain 0001 OilSeed 0001 Hay 0002 Grain function =vlookupall("0001", A:A, 1, " ") Here is the code: Function VLookupAll(ByVal lookup_value As String, _ ByVal lookup_column As range, _ ByVal return_value_column As Long, _ Optional seperator As String = ", ") As String Application.ScreenUpdating = False Dim i As Long Dim result As String For i = 1 To lookup_column.Rows.count If Len(lookup_column(i, 1).text) <> 0 Then If lookup_column(i, 1).text = lookup_value Then result = result & (lookup_column(i).offset(0, return_value_column).text & seperator) End If End If Next If Len(result) <> 0 Then result = Left(result, Len(result) - Len(seperator)) End If VLookupAll = result Application.ScreenUpdating = True End FunctionNotes:

    Read the article

  • Vba to Access record Insert Issue

    - by raam
    I want to insert Values to access table by using VBA control is there is any simple way to do this. i try this code but it does not work properly if i run this code it give the error 'variable not set' can anyone help me. thanks in advance Private Sub CommandButton1_Click() Dim cn As ADODB.Connection Dim strSql As String Dim lngKt As Long Dim dbConnectStr As String Dim Catalog As Object Dim cnt As ADODB.Connection Dim dbPath As String Dim myRecordset As New ADODB.Recordset Dim SQL As String, SQL2 As String dbPath = "table.accdb" dbConnectStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & dbPath & ";" SQL = "INSERT INTO Jun_pre (ProductName,DESCRIPTION,SKU,MT,(mt),MRP,Remark,no_of_units_in_a_case) VALUES (""aa"",""bb"",""test"",""testUnit"",""1"",""2"",,""3"",,""4"");" With cnt .Open dbConnectStr 'some other string was there .Execute (SQL) .Close End With End Sub

    Read the article

  • How to fill many texbox by using loop function in VBA

    - by melt
    Hi ! I made a user interface in VBA with many textbox. I read an excel sheet and I put all the value of this one in all the textbox of my user inteface. So the user can modify the values and then save it in the excel sheet. Because we can't name the textbox like array (textBox(1), textbox(2)....) this is hard to fill the textbox by using a loop function. I tried to use tag or tabindex property but I don't find the good way to proceed .... Is someone know an easy way to solve this !!! Thanks

    Read the article

  • Transponse the data from vertical to horizondal using vba

    - by raam
    I wants to popualte the data in MS-Access into Excel for this i am using VBA This is my code varConnection = "ODBC; DSN=MS Access Database;DBQ=D:\sample\table.accdb; Driver={Driver do Microsoft Access (*.accdb)}" varSQL = "SELECT * FROM LeftPanes" With ActiveSheet.QueryTables.Add(Connection:=varConnection, Destination:=ActiveSheet.Range("B4")) .CommandText = varSQL .Name = "Query-39008" .Refresh BackgroundQuery:=False End With Its working Properly it retrive data and display in the correct sheet my problem is that this code display the retrived date in vertically view i needs horizondal view. it is possible to display in horizondal view please any one guide me . Thanks in advance

    Read the article

  • Stored procedure does not return data if executed from VBA

    - by Sam
    I had stored procedure MySPOld in Sybase db. I created new sp MySP. This new sp returns data while executed from Sybase Sql Advantage. But not returning the data when called from VBA - Excel 2003 (EOF property of recordset is True). Here is my code.. Dim dbCon As ADODB.Connection Dim rstTemp As New ADODB.Recordset Dim query As String query = "exec MySP '01/01/2010', '01/14/2010'" dbCon.Open connectionString, "username" "password" dbCon.CommandTimeout = 300 rstTemp.Open query, dbCon, adOpenForwardOnly The code was working well with old sp. What could be the problem ? any idea ? Thanks in Advance.

    Read the article

  • Get the content of a sharepoint folder with Excel VBA

    - by Blackethylene
    Usually I use this piece of code to retrieve the content of a folder in VBA. But this doesn't work in the case of a sharepoint. How can I do ? Dim folder As folder Dim f As File Dim fs As New FileSystemObject Set folder = fs.GetFolder("//sharepoint.address/path/to/folder") For Each f In folder.Files 'Do something Next f EDIT (after a good comment by shahkalpesh) : I can access to the sharepoint if I enter the address in Windows Explorer. Access to the sharepoint needs an authentification, but it's transparent, because it relies on the Windows login.

    Read the article

  • VBA for filtering columns

    - by Ampi Severe
    I have a big database-like sheet, first row contains headers. I would like a subset of rows of this table based on column values. Two issues: 1) VBA-wise I would like to loop through the columns, when the values for all necessary columns all match, copy the entire row into a new sheet. 2) The subset of rows is based on a list. This should be the first column to be looped through. For example I want all rows where the value in column A is equal to one of the values in my list. Is there any possibility to autofilter strings based on a list (column) of strings? EDIT Thanks to @Doug Glancy the autofiltering works now, so I've removed my (horrible) code and issue 1 is solved.

    Read the article

  • Passing parameters in VBA for Access

    - by Newbie
    In Access 2007 I have created a form with a textbox and a button. At the moment, when I press the button, I load a query with the textbox data passed as a parameter to the query criteria. I would like to change this so that all (manually input) options appear in a combobox (in place of the textbox). I would then like to pass the combobox text to a VBA module upon pressing the button. How do I do this? Similarly, I hope to output a different string from this module, and I hope to use this as the query criteria. How do I do this?

    Read the article

  • Upload a .pdf file to a Sharepoint Document Library using Access vba

    - by Jim Shaffer
    Within an Access 2007 application, I'm creating a static report in .pdf format. I want to create it, then export the static report (not the data itself) to a Sharepoint Document Library. The intent is for it to be a public repository, no versioning. Each report will carry a unique name. I'm a seasoned vba programmer, but using Sharepoint services is new to me. How do I go about doing this? Assume I can identify the file name and location after I've generated it, and I know the Sharepoint library URL, and have permissions. Where do I go from there?

    Read the article

  • Need a Concatenating VBA code to prevent memory issue workaround

    - by doharr
    My set up: Have 50,000 rows of data. ( My row count will increase in the future. So might as well say I have a full worksheet of 64000+ rows.) All Data is TEXT, no formulas, etc. Column A is open Columns B thru AC contain the Data that needs to be concatenated The Data in the rows once concatenated to Column A will contain 60,000 digits or 6kb in file size. After additional maniuplation each cell will become a file. I have tried concatenating in Excel and I run into memory issues. The memory issue is when I Select and fill down the concatenating function into the worksheet. It crashes at the 8200 +/-row. My system is 2gb of ram, windows xp professional and Excel 2003. Have 4GB of disk space Hoping to find a VBA code that will conserve memory, and not crash like it does in excel. Thank you

    Read the article

  • Beginner Access VBA SQL INSERT Question

    - by Josh K
    Syntax question: I am using the code below to call a query in Access VBA strSQL = "INSERT INTO tblLoanDetails ([ServerName]) VALUES ('Test') WHERE [ID]=3" Call CurrentDb.Execute(strSQL) And i am getting a runtime error of "3067: Query must contain atleast one table or query." the insert statement string looks like this (Threw the var into a text box): INSERT INTO tblLoanDetails ([ServerName]) VALUES ('Test') WHERE [ID]=3 I also tried adding a semi-colon to the end but with no luck. I also double checked to make sure my table is called tblLoanDetails and my Column names are ServerName, and ID Appreciate any help.

    Read the article

  • c# converting select case VBA to c# SWITCH

    - by herrow
    i have some vba code that i need to convert to c# Select Case letter0 Case "A01" Cells(rownum, 2).Value = "1" Case "B01" Cells(rownum, 2).Value = "2" Case "C01" Cells(rownum, 2).Value = "3" Case "D01" Cells(rownum, 2).Value = "4" Case "E01" Cells(rownum, 2).Value = "5" Case "F01" Cells(rownum, 2).Value = "6" Case "G01" Cells(rownum, 2).Value = "7" Case "H01" Cells(rownum, 2).Value = "8" Case "A02" Cells(rownum, 2).Value = "9" Case "B02" ... .. i understand how to do a switch on this, but is there an easier method? i will not be checking CELLS(rownum.........) instead of will be doing switch(somestring) is there an easier way to do this than explicitly write every single case?

    Read the article

  • How to Crop Pictures in Word, Excel, and PowerPoint 2010

    - by DigitalGeekery
    When you add pictures to your Office documents you might need to crop them to remove unwanted areas, or isolate a specific part. Today we’ll take a look at how to crop images in Office 2010. Note: We will show you examples in Word, but you can crop images in Word, Excel, and PowerPoint. To insert a picture into your Office document, click the Picture button on the Insert tab. The Picture Tools format ribbon should now be active. If not, click on the image. New in Office 2010 is the ability to see the area of the photo that you are keeping in addition to what will be cropped out. On the Format tab, click Crop. Click and drag inward any of the four corners to crop from any one side. Notice you can still see the area to be cropped out is show in translucent gray. Press and hold the CTRL key while you drag a corner cropping handle inward to crop equally on all four sides. To crop equally on right and left or the top and bottom, press and hold down the CTRL key while you drag the center cropping handle on either side inward. You can further adjust the cropping area by clicking and dragging the picture behind the cropping area. To accept the current dimensions and crop the photo, press escape or click anywhere outside the cropping area. You can manually crop the image to exact dimensions. This can be done by right clicking on the image and entering the dimensions in the Width and Height boxes, or in the Size group on the Format tab.   Crop to a Shape Select your photo and click Crop from the Size group on the Format tab. Select Crop to Shape and choose any of the available shapes. You photo will be cropped into that shape. Using Fit and Fill If you wish to crop a photo but fill the shape, select Fill. When you choose this option, some edges of the picture might not display but the original picture aspect ratio is maintained. If you wish to have all of the picture fit within a shape, choose Fit. The original picture aspect ratio will be maintained.   Conclusion Users moving from previous versions of Microsoft Office are sure to appreciate the improved cropping abilities in Office 2010, especially the ability to see what will and won’t be kept when you crop a photo. Similar Articles Productive Geek Tips Import Microsoft Access Data Into ExcelEmbed an Excel Worksheet Into PowerPoint or Word 2007Add Artistic Effects to Your Pictures in Office 2010Embed True Type Fonts in Word and PowerPoint 2007 DocumentsChange The Default Color Scheme In Office 2007 TouchFreeze Alternative in AutoHotkey The Icy Undertow Desktop Windows Home Server – Backup to LAN The Clear & Clean Desktop Use This Bookmarklet to Easily Get Albums Use AutoHotkey to Assign a Hotkey to a Specific Window Latest Software Reviews Tinyhacker Random Tips Xobni Plus for Outlook All My Movies 5.9 CloudBerry Online Backup 1.5 for Windows Home Server Snagit 10 TimeToMeet is a Simple Online Meeting Planning Tool Easily Create More Bookmark Toolbars in Firefox Filevo is a Cool File Hosting & Sharing Site Get a free copy of WinUtilities Pro 2010 World Cup Schedule Boot Snooze – Reboot and then Standby or Hibernate

    Read the article

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