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 strongm 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. VBOnly

    Please help: Pop up calendar

    You could use the VeforeUpdate event to modify the value of the calendar to the first day of week (which you set to Sunday. Trial code (ActiveXCtl6 is the Calendar object): Private Sub ActiveXCtl6_BeforeUpdate(Cancel As Integer) Dim v Dim wk As Integer With ActiveXCtl6 v =...
  2. VBOnly

    Continous forms and calculations

    How about the following code in the current event. I have not test it. Assume you data is sorted by reading date. private Sub Form_Current() dim prev, cur dim rst as Recordset 'cur = xxx value for current reading set rst=me.Recordsetclone set rst.bookmark =...
  3. VBOnly

    Save As Workbook to current Directory

    The right reference is the path property of the workbook from which the program is running. This workbook is called ThisWorkbook, probably after the key work "this" in C++. Similarly, in Word, use ThisDocument. ThisWorkBook.path + "yourfilename.xls" It took me quit a...
  4. VBOnly

    Pop Up Calendar - Unchecking a date

    If you just need the cell not set-in, set the calendar value property to Null. As: cal1.Value = Null Of cause you need the put this in a button event.
  5. VBOnly

    Referencing a report control using ADO

    Do you really want change the value only: with Me.Controls(rptDEA_No) .SetFocus ' a must in ACCESS .Text = rst![DEA_No] 'this syntax doesn't work at all end with If you use "'Me.Controls(rptDEA_No).ControlSource = rst![DEA_No] 'this syntax doesn't work at all make sure the...
  6. VBOnly

    Find File Button

    Try to display all file and dirs of a known directory and debug.print them. Or, I think the problem may be that this routine is never called. Change it to the double click event or put it in Form inialization method, or the event code of a button. <CODE> Private Sub...
  7. VBOnly

    Not all the records returning from database?

    kelqc: Don't know exact mechanism there, but mathematic union does gives only non-repeating elements. The solution would be to add the primary key field name of the database in both SQLs. This will definite get you all the records. I recommend to include the primary key in all the SQL...
  8. VBOnly

    How to set &quot;Rotate fill effect with shape&quot; in Word by VBA

    Have not get any suggestion. So I will explain the problem more clearly. In the Word, a drawing shape (e.g. rectangle) can be filled with a user specific image file. Word let you to keep aspect ratio of the picture if you click the &quot;Lock picture aspect ratio&quot; on the [Fill Effect]...
  9. VBOnly

    Excel Worksheets.Copy in VBS???

    Though the copy method work, the &quot;template&quot; may worker more transparent. Open the default .xls and save as .xlt. Next time you use menu &quot;File&quot;-&quot;New&quot;, the template file show up in the New dialog, click it and open, you will get a new file will all the sheets...
  10. VBOnly

    Get file in powerpoint

    In Office 2002, Application.FileDialog work in all. Use &quot;msoFileDialogFilePicker&quot; to select files to process yourself. Function GetFilename() As String With Application.FileDialog(msoFileDialogFilePicker) .ButtonName = &quot;Save&quot; .Filters.Clear...
  11. VBOnly

    display pics in form datasheet view?

    Well, the Continuous Form is almost like the data sheet view, esp. if top and bottom spaces are cut to minimum. Try it.
  12. VBOnly

    &quot;Object variable or With block variable not set&quot; Message

    I had this problem several times. ACCESS crash when the startup form opens, so I have no way to access the database. If you know the form or module which you have made most additions, open a new .mdb and import the change form/module, cut-paste to update your backup. It may same some time.
  13. VBOnly

    Excel - Duplicate Data

    One cross-software solution using Word compare document feature, not very neat. Select and copy the first workbook to word and save in Word. Select and copy the second to Word. In the 2nd Word document, run menu &quot;Tool&quot;-&quot;Compare Document&quot; to compare to the first Word file...
  14. VBOnly

    Combining cells for a time value in excel 2000

    There is no shorter way. You can change the LEFT with length calculation to improve: =LEFT(B2,len(B2)-4)&&quot;/&quot;&MID(B2,2,2)&&quot;/&quot;&MID(B2,4,2)&&quot; &quot;&LEFT(A2,len(A2)-2)&&quot;:&quot;&MID(A2,2,2) The above is not true date-time calculation, just string manipulation.
  15. VBOnly

    Email my spread sheet

    The FAQ on VBA How to &quot;Send an email from Excel through Outlook (with or without attachments&quot; provided the solution already.
  16. VBOnly

    Removing line numbers from a text file

    Here is a easy solution if by &quot;numbers&quot; you mean [0..9] not including &quot;.&quot; function Delete0to9(byval s as string) as string dim i as integer for i = 0 to 9 s=replace(s, cstr(i),&quot;&quot;) next i Delete0to8 = s end function I think Replace function...
  17. VBOnly

    Not all the records returning from database?

    The problem lies in the SELECT statement add predicate ALL will solve your problem: SQL1 = &quot;Select ALL sample.job_no from sample where .. For more information check the syntax at: http://www.asp-help.com/database/db_sql_stmt.asp#SELECT
  18. VBOnly

    Paste Help

    To copy rows or columns, select by click and drag (or <Shift>+arrow_key) on the left header column (the grayed numbers, 1,2,...) or the header row. The entire rows/columns are selected. Go to target sheet, select a cell on the 1st column/row and press <Ctrl>-V (or paste special with width or...
  19. VBOnly

    Paste Help

    I belive you can not preserving row height (unless you are copying entire rows) or column width (unless they are entire columns). All other properties can be copied over.
  20. VBOnly

    Find File Button

    You may have the directory misspelled. Try Dir(&quot;...\*.*), you should at least get &quot;.&quot; and &quot;..&quot; directories if the directory exists. The files could be *.htm, then use &quot;C:....*.htm*. An argument could be added to the Dir as: Dir(&quot;C:\Documents and...

Part and Inventory Search

Back
Top