Posts by JJacob

    This code only adds Item from first column to list. Is their a reason that A listbox.list cannot be generated from a single row with multi columns? "N" is showing the correct integer to list data from the appropriate columns into the listbox. Again it only adds first item (data in first column).


    thanks


    This loop is overwriting the first cell in range and not writing to the first blank cell in range.


    Code
    For Each cnote In NOTE
    If Trim(cnote).Value = "" Then
    cnote.Value = notes.Value
    Exit For
    Else
    End If
    Next cnote


    If I take out the exit for , it copies to all cells in range


    thanks

    I am trying to loop through a range and add data to the first empty cell in the range. This does not seem to be working.


    Code
    Set NOTE = Range("rStartCell.Offset(0, 50):rStartCell.Offset(0, 60)")
    For Each cnote In NOTE
    If cnote.Value < 0 Or cnote.Value = "" Then
    cnote.Value = notes.Value
    Exit For
    Else
    End If
    Next cnote



    thanks for the help

    Re: Trigger Macro When Cell Withing Range Deleted


    Code
    Private Sub Worksheet_Change(ByVal Target As Range) 
        Dim r As Range 
        Set r = Intersect(Target, Range("D10:F37")) 
        If Not r Is Nothing Then 
            MsgBox r.Address 
        End If 
    End Sub


    This code is also triggering macro as I add data not just when removing from the worksheet range and is causing problems. any way to make it work only when cell are cleared or deleted in a specified range?


    thanks

    Re: Keep Userform On Top In Windows?


    Hi Andy,


    thanks for the help.


    Mr Maolas Splash screen examples fall behind an application that is opened if selected after the splashscrrens have intitialized. His Calculator "stay on top" program leaves the calculator in front of any application desktop either already running or selected after the calculator application is started.


    I am trying to get a userform to stay ln front of a mainframe database desktop so that data can be copied line by line and entered into textboxes for calculations. If I try it now, as soon as the data to be copied is selected, the userform drops behind the data base desk top and then the database desktop must be minimized to copy into the userform.


    thanks for the help

    Is it possible to keep an excel userform on top of an active window from an application other than excel? I have seen a program using API calls from Ivan Maola forcing windows calculator application to remain on top of any desktop and I am curious if it can be done with a userform.



    thanks

    Re: Right Click Paste To Textbox


    This code is working from any source I have tried so far using the mousedown event.



    I am also using the code below to hide excel application while I am copying from the outside source while I am pasteing to the textbox.


    Code
    Private Sub UserForm_Click()
    Application.Visible = False
    
    
    End Sub


    As soon as I select the data from an outside source to copy, the userform drops behind the copy source. I then need to minimize the copy source to have access to the textbox to paste. It drops out of sight whether shown modal or not. Any Ideas how to keep it at the front of the desktop without minimizing the copy source?


    thanks

    Re: Right Click Paste To Textbox


    Thanks for the help RoyUK but I am needing to paste from a mainframe not a workbook. Think it will still work? I am not currently on the desktop to log in and try it.


    thanks