Posts by natalie_p_4444

    Here is the code I use to reference the workbook I'm later struggling to open/see.


    Later I have made a button purely to open this workbook because I was having some trouble:


    Code
    Sub Button12_Click()
    
    Dim filepath As String
    Dim register As Workbook
    
    filepath = "Filepath\Pricing Register.xlsm"
    
    Set register = Workbooks.Open(filepath)
    
    End Sub


    The code runs without error but won't display the workbook.


    However, I can see the sheets, macros etc, for the Pricing Register workbook in the VBA project explorer. It's the same when opening the file directly via the File > Open menu.

    Hello,


    I have built a simple quotation system that references a master price list to populate the price fields. The user forms all work as they should, but for some reason, I cannot open the price list workbook anymore. When the macros are running, I can see the file in the VBA project explorer open/close as it should. But when I open the price list directly, I see it download from the server, enable the macros, then a blank grey screen is shown on Excel, even though the file is definitely open in the VBA project explorer.


    I have tried a few things so far:

    1) Ensure I haven't hidden the file

    2) Made a copy, renamed, moved file location etc.

    3) Changed my user permissions to have full access


    I haven't altered this workbook and only open it once on my user form using the "GetObject" command to retrieve some cell values. I do need to be able to update this workbook as it is the master price list.


    Is there a problem with the workbook or the way that I am using it here? This is my first VBA project so still learning a lot!


    Thanks

    Hi there,


    I have made a simple userform for data entry that is linked to a table. On the form, I made a Date text box set with a default value of today's date so the user has the option to amend the date.


    I have managed to change the form formatting to display "dd/mm/yy" but when the entry is added to the table the format reverts to "mm/dd/yy".


    The UserForm_Initialize() part works fine:

    Code
    'Fill Date Box With Today
    Date_Box.Value = Format(Date, "dd/mm/yy")

    Here is the Add_Button.Click() part that reverts the formatting:

    Code
    'Transfer Date Value
    Cells(emptyRow, 2).Value = Date_Box.Value

    What can I do to make the date exported in a dd/mm/yy format? Or do I need to change the format on the table itself for that column?


    This is my first time using VBA and userforms so still getting to grips with the basics - thanks in advance :)