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. Fr33dan

    Combobox text remains selected after autocomplete + tab

    Have you tried using the LostFocus event to clear the selection? It's not optimal but it should get the job done: this.clientComboBox.LostFocus += new EventHandler(clientComboBox_LostFocus); ... void clientComboBox_LostFocus(object sender, EventArgs e) { this.clientComboBox.Select(0, 0); }
  2. Fr33dan

    Unwanted Message box when applying filter

    Well After reading your post I thought "Thats so simple it just might be the problem". The name of the field in the table is Auto Number not AutoNumber. Thank you very much for helping fix my own stupidity.
  3. Fr33dan

    Unwanted Message box when applying filter

    Hi. I've been working on a database for awhile now and I have a button on a form that is supposed to apply a filter based on criteria from the user. However when I actually go to apply the filter in the code I get an message asking to input the value for the filter even though I stated it in the...
  4. Fr33dan

    Macro getting stuck in debug mode - How to stop this behavior

    I've had issues where I used a breakpoint, closed the file without removing it and when I reopened the file it was still there but invisible. Try setting a breakpoint and removing it.
  5. Fr33dan

    VLOOKUP VBA COMBOBOX

    Me.cmbtradeid.Value is returning a string so vlookup is looking for a string. you'll have to convert the string to an actual number as you get it: tradeid = Clng(Me.cmbtradeid.Value)
  6. Fr33dan

    VLOOKUP VBA COMBOBOX

    Try replacing Application.WorksheetFunction.VLookup with Application.VLookup
  7. Fr33dan

    VLOOKUP VBA COMBOBOX

    Where are you trying to set the return of the lookup to the value of ComboBox? What is the name of the ComboBox?
  8. Fr33dan

    CopyFolder error from CD

    I'm trying to write code that will copy all the files and folders from a CD to a folder on my hard drive with the same name as the CD volume label. Then it will alert me to insert the next disk and copy those files. I get an "Invalid procedure call or argument" error on fso.CopyFolder line...
  9. Fr33dan

    User-Function Auto Activation

    Private Sub Worksheet_Change(ByVal Target As Excel.Range) ' Call or Write Method here End Sub This will run whenever a worksheet changes but I'm not sure if there is a sub that covers the entire workbook.
  10. Fr33dan

    Select Multiple Checkboxes with one checkbox

    Try this approach: Private Sub All_Click() Dim ctl As Control For Each ctl In Me.Controls If TypeName(ctl) = "CheckBox" Then ctl.Value = All.Value End If Next ctl End Sub
  11. Fr33dan

    Select Multiple Checkboxes with one checkbox

    Andy's got how to loop through them (I didn't know how). Just put that in the _Clicked sub: Private Sub All_Click() Dim ctl As Control For Each ctl In Me.Controls If TypeOf ctl Is CheckBox Then ctl.Value = All.Value End If Next ctl End Sub of course...
  12. Fr33dan

    Select Multiple Checkboxes with one checkbox

    or you could add code to the _Click sub of the checkbox: Private Sub CheckBox1_Click() CheckBox2.Value = CheckBox1.Value CheckBox3.Value = CheckBox1.Value etc... End Sub
  13. Fr33dan

    Copying shapes and paste to different worksheets using VBA

    Well if they're the only shapes objects on the sheet then you could use a nested loop to copy each object individually on each sheet: Sub CopyAllShapes() Application.ScreenUpdating = False Set xlShapes = Sheets(ActiveSheet.Index).Shapes For i = 2 To Sheets.Count For j = 1 To...
  14. Fr33dan

    Copying shapes and paste to different worksheets using VBA

    You'd have to re-update the names to the local versions of themselves like combo said in the first response. I don't know them so I just used the names that were originally there.
  15. Fr33dan

    Copying shapes and paste to different worksheets using VBA

    You could eliminate the selecting and just use ActiveSheet.Shapes.Range(Array("Line 1","Picture2")).Copy Sheets("Sheet3").Cells.Paste Also try setting Application.ScreenUpdating to false at the beginning of your code. That makes the code run alot quicker.
  16. Fr33dan

    Save Excel Spreadsheet as different name

    Format(Date, "mmddyy") will give you the date in the format you showed.
  17. Fr33dan

    Use VBA in Excel to find and replace selected formulas with values

    Well you'll need to use Cells.find, Check the built in Help start working on some code and come back if you need any help with it. We will not write the code for you
  18. Fr33dan

    VBA code to check if a program is currently running on the pc

    I'd try to activate it and if it gives me an error then exit and display a message: On Error GoTo lotusNotOpen lotusOpen = False AppActivate "Lotus Notes" AppActivate "Microsoft Excel" On Error GoTo 0 lotusOpen = True at the beginning of the sub lotusNotOpen: If Not lotusOpen Then MsgBox...
  19. Fr33dan

    Worksheet_change not working?

    You want to try and avoid .Select as much as possible. As for why it's not working. Your if statement doesn't check what you want correctly. Sub Worksheet_Change(ByVal Target As Range) If Application.WorksheetFunction.IsError(Sheets("Efficiency").Range("B3")) Then...
  20. Fr33dan

    'Last Updated' Worksheet_Change event disables Undo

    It occurred to me that you could also override the keyboard shortcuts for undo and redo to your own versions. It wouldn't make it work in the edit menu but you would get some of the functionality. It would look something like this: Private Sub Worksheet_Change(ByVal Target As Excel.Range)...

Part and Inventory Search

Back
Top