Posts by hearthhrob4gals

    Hi,


    I have seen many codes on thsi where it first opens outlooks, selects the email and initially saves it as .htm and then uses word for the conversion. My requirement is a bit simpler and shorter.


    I already have a .msg file saved on my Desktop and just want to convert it into PDF. I dont need to open outlook.


    Can someone help with the code


    Thanks

    i know that...the purpose was never to check if the file is open or not.. i know the file will be open...i just wanted to know in this case when my file will be opened how the below line should be rewritten. set objworkbook should refer to active workworkbook


    Code
    Set objWorkbook = Workbooks.Open(FPath & "\" & FName)

    Hi,


    Thanks for the prompt response.

    Fname is the activeworkbook name.


    Now getting an error on this libe : - If Not wbOpen(FName) Then


    Error: Byref argument type mismatch


    Code
    FName = ThisWorkbook.Name
       Dim objWorkbook As Workbook
    If Not wbOpen(FName) Then
    Set objWorkbook = Workbooks.Open(thisworkwook.path & "\" & ThisWorkbook.Name)
    Else
    Set objWorkbook = FName
    End If
    
    iRow = 1
    iCol = 1

    Hi,


    The below code, set objworkbook opens an excel file. in my case, the excel file is already open. How to replace this set line to accommodate the already opened excel file

    Code
        Dim objWorkbook As Workbook
        Set objWorkbook = Workbooks.Open(FPath & "\" & FName)
        
    
        iRow = 1
        iCol = 1
        
        'Get the number of rows and columns
        Set iSh = objWorkbook.Sheets(5)

    Hi,


    I'm doing data transfer between 2 excel files in Citrix.....The issue is that at times even though i am in 'x' sheet, it still shows the 'y' sheet.....at time, it shows split of x and y sheet....top row from X sheet and rest of rows from y sheet. i believe this is because of the latency issue. The problem is that i want to show the activities happening on the screen and have added manual delays as well. but because of this inconsistency in showing the right sheet and split of 2 sheets i cant record my demo.


    Is there anyway to ensure that correct sheet is shown without latency issue? (on citrix)

    Hi,

    The below code does paste it as value. Can we modify it to do paste special value? Also, if format can be retained it would be great.


    Code
    Sub copyops()
    Call CopyValues(Workbooks("WINS.xlsx").Sheets("sheet1").Range("A1:A5"), Workbooks("Team_wins.xlsx").Sheets("Team WINS").Range("B1"))
    End Sub
    
    Sub CopyValues(rngSource As Range, rngTarget As Range)    rngTarget.Resize(rngSource.Rows.Count, rngSource.Columns.Count).Value = rngSource.Value
    End Sub

    Re: userform not getting closed/unloaded


    [INDENT]even that didnt work..i have tried many methods like moving the form to extreme side so that its not visible on the screen post clicking on the stop button since once you again click on the start button it opens a new form....however the old form is not moving to the right....its stuck there...not getting clocked, not moving anywhere[/INDENT]

    Quote from royUK;791390

    It would help if frmAli had a CommandButtob1 on it. The codes there but no button. Add the button and amend the code like this


    Code
    Private Sub CommandButton1_Click()
    bstop = True
    Unload frmAli
    End Sub

    Re: userform not getting closed/unloaded


    even that didnt work..i have tried many methods like moving the form to extreme side so that its not visible on the screen post clicking on the stop button since once you again click on the start button it opens a new form....however the old form is not moving to the right....its stuck there...not getting clocked, not moving anywhere

    Re: userform not getting closed/unloaded


    i dont want user to close the userform..... The userform should be visible till user clicks on the stop button.......the challange is that i have written the unload me code in the stop button clcik event. However that form never gets unloaded....it just stays der...

    Hi,


    below is my code. i just want the pdf file to get close post pasting the data




    i have written the code which should do the job. however, since post pasting the excel file is getting activated, i believe thats not reactivating the pdf file for closure.


    Code
    SendKeys "%{F4}", True


    help on this would be appreciated

    Re: check the data type of a particular range of data in excel columns


    Quote from mikerickson;766223

    Something like this might suit.




    whatever i select as an input, the output is coming as range