Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. DomThePom

    Retrieve and parse data from access to excel

    The code above will work but it is a bit slow - quicker to use the copyfromrecordset method of the range object as follows: ********************************************** assume that you have defined an excel application, workbook and sheet (xlShtData), and you have a recordset (rst) that you...
  2. DomThePom

    How do I cut annotaions off csv-files???

    Here is the code you need: Function RemoveHeaderAndFooter(ByVal strOldFileName As String, _ ByVal strNewFileName As String) As Variant 'function removes header and footer from stroldldFileName 'creating strNewFileName and returning an array of the...
  3. DomThePom

    Creating Dynamic Queries

    2 points: 1. If you are creating a query in code, and you do not need to access it within the user inrterface, then use the syntax: dim qry as querydef dim db as database set db = currentdb set qry = db.createquerydef("") qry.sql = ........ '.......code to manipulate qry object...
  4. DomThePom

    closing excel instances using vb- urgent

    This will do the trick: Sub CloseAllInstancesOfExcel() Dim objXL As Excel.Application On Error Resume Next Do Set objXL = GetObject(, "Excel.Application") With objXL .DisplayAlerts = False .Quit End With...
  5. DomThePom

    Copy Paste a variable number of rows

    No send keys please! You need to use the end property of the range object - help is as follows-: Returns a Range object that represents the cell at the end of the region that contains the source range. Equivalent to pressing END+UP ARROW, END+DOWN ARROW, END+LEFT ARROW, or END+RIGHT ARROW...
  6. DomThePom

    Break key

    Keystrokes will depend on what system you are emulating. Best way to find out is to use the Extra! macro recorder. Once you have found the correct keystrokes you need to build a routine that sends the keystrokes and then waits until the screen shows what you need before continuing. All the best
  7. DomThePom

    Need to get info from one spread sheet into another

    Copy the code below into a new module - hopefully should be self explanatory - if not post again! Option Explicit Private Const BIF_RETURNONLYFSDIRS = 1 Private Const BIF_DONTGOBELOWDOMAIN = 2 Private Const MAX_PATH = 260 Private Declare Function SHBrowseForFolder Lib...
  8. DomThePom

    Changing the cell color in excel whenever the cell's text is changed

    You need the change event of the worksheet objectb - in project explrer double0click the appropriate worksheet and enter code like this: Private Sub Worksheet_Change(ByVal Target As Excel.Range) Const YELLOW As Long = 6 With Target.Interior .ColorIndex = YELLOW...
  9. DomThePom

    Asking help on adding index on Access

    Yes you can easily create indexes in Access: In the user interface: With the table in design mode, select the field that you want to index and then choose, as required, either "Yes (duplicates OK)" or "Yes (No duplicates)" in the Indexes section of the General properties...
  10. DomThePom

    task scheduler running macro problem

    When you initiall set up the connection to the ODBC source the dialog in which you choose tabloes to attach to has a "Save Password" check box - simply check this box and you will not be asked for a password each time you use the connection
  11. DomThePom

    Hyperlink to legacy of Accounting app screens

    If your legacy app is VBA compatable then you just need to create a reference to its object library file (.olb) and then maniplute its objects in the same way as other VBA apps. If, which is more likely, your legacy app is not VBA compatable then you need a terminal emulator app such as...
  12. DomThePom

    vba trouble copying values only from one wrkbk to another

    Here is some code that does the trick - a few pointers: 1. Where a method requires range objects for arguments it is always safer to explicitly define the range objects - it will be immediately apparent if there is something wrong with a range 2. Use the "for each [object] in...
  13. DomThePom

    Load Calendar in VBA

    Assuming you atre using VBA with Excel: 1. In the VBA interface (Alt+F11) Go to Tools / Additional controls and select Calendar Control - this adds the Calendar control to the toolbox 2. Create a new userform (insert /Userform) - in the properties window give the from a relevant name (e.g...

Part and Inventory Search

Back
Top