Posts by stevehorton09

    Hi there,

    I have read previous posts but they dont seem to work.

    I have a file already open and i want to reopen it so two versions are open.

    The code then saves the original as another name and does not change the data therfore of this.

    Any ideas: code is below

    Workbooks.Open ("C:\Documents and Settings\shorton\Desktop\Oracle Support GL Maintenance Systemv2.xls")

    ActiveWorkbook.SaveAs Filename:="R:\COMMON\ORACLE\TEST_Approved\" & Range("a12") & "_" & Range("b14") & "_" & Format(Date, "dd-mm-yy") & "_" & Format(Time, "HH-MM AM/PM") & ".xls", FileFormat:=xlNormal, _
    Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, _
    Application.DisplayAlerts = False
    Unload Me

    hi guys,

    real quick question as forgetting simple code again!!

    I have a file that i want to close (ActiveWindow.Close) and the open another file R:\common\sch.

    What is the code for opening a file???!?!?:()

    Sorry bet its me,

    The user fills in a form and presses send.

    An email is then populated telling the approver where the form the user has just filled is located.

    i.e r:\local\

    Afetr it has been sent, I would like the location (shown in the email) to be a hyperlink or a link.

    I want the approver to either click on location in the email and be taken to the spreadsheet


    The approver clicks on the location in the email and they are taken into the folder itself and can llok for the file

    hope this helps!

    Hi xlite,

    That would be great but the textbox is in an email type form so i would prefer that they just clicked on a location. I have sent my current spreadsheet, click on open form (if it does not automatically) and then the top left button in the form.

    The email form shows a location in the textbox where the form has been saved to i.e r:\local\

    I want it so someone can just click on this location and it opens explorer for example


    Is there a way to make a filename a hyperlink or link within a text box?

    My current code (below) just copies the workbook name.

    Is there a way so that someone could click on the filename in the text box and it would go to that location.

    I.e file is in c:\local\a.xls, this location shown the textbox1, by someone clicking on this it goes to this location in say explorer or opens the worksheet??

    Private Sub UserForm_Initialize()

    Set wb = ActiveWorkbook
    TextBox1.Text = wb.FullName

    End sub

    Hi there,

    I have used the code helped with by philby(thank you) and i have modified in it in everyway possible except the way i need!!

    I can currently attach only one file and need to be able to attach more than one file from a location. I have tried an array but know it does not attach any files!!!

    I have the file attached as i think the email functionality is very helpful to all though for it to fully work you have to have a pathway on the c:\drive called c:\eform\local. The reason being is the form saves itself in a location and then when the email is ready to be sent it looks in that location.

    I have also attached a working option that only attaches the one file

    may be missing the point as im having a bad day, but a vlookup could help remove identical entries.

    Also if you know what you need to delete i.e area code 201 then do a find and replace or custom filter i.e equal to 201 etc

    probably of no help at all but thought i would put some input in

    it was looking so good untill i sent it through lotus notes!

    I need to some how get " between the file name i.e

    "c.xls" "d.xls" (exactley like this)

    It does not like ;

    I have checked lotus notes and when i manually do this they look like my example above.

    is this possible to have " either end of the file name(s)?

    basically if i had file c.xls and d.xls, i would need them to concatenate as follows:-

    "c.xls" "d.xls"

    i have had a look and the code will not match the mypath stuff, i have corrected the errors i found but still lost.

    i hope this helps

    The two parts of the code are below

    Private Function GetAttach() As Variant
    Dim strFileFullPath As Variant

    strFileFullPath = Application.GetOpenFilename("Xl Files (*.xls), *.xls", , , , True)
    If Not IsArray(strFileFullPath) Then
    MsgBox "No File Selected"
    Unload Me
    GetAttach = strFileFullPath
    End If
    End Function

    Private Sub CommandButton3_Click()

    ' setting and attaching the work book
    Dim MyPath As String
    Dim SaveDriveDir As String
    Dim saveasname As String

    SaveDriveDir = CurDir
    MyPath = "c:\eform\local"

    ChDrive MyPath
    ChDir MyPath

    Attachment1 = GetAttach
    attach.Text = Attachment1

    ChDrive SaveDriveDir
    ChDir SaveDriveDir

    End Sub