thank you both for your help
Posts by stevehorton09
Is it possible to password protect a whole workbook.
I.e someone goes to open the workbook and it asks for a password and if they enter it wrong they can not enter the workbook
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
told you having a bad day! thanks
why does this not work??
Workbooks.Open(C:\Documents and Settings\shorton\Desktop\Oracle Support GL Maintenance System.xls)
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???!?!?:()
thanks very much!
modified it and it worked perfectly
I have actually worked it out now.
I just set more attachment boxes and changed the code slightly.
Thanks very much for you help as i would not have got there without your help
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.
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!
here is the sheet without a password on it
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
SEE NEXT POST FOR CORRECT SHEET
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
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
i have attached the file, this is really annoying me now!!! ha ha
hope this helps
i have worked out how to do the " but it is not attaching at all, it must be the mypath stuff!!!
your help would be much appreciated
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:-
HEY HEY IT WORKS!
Could you quickly explain how! im a bit lost on how it works
still no joy,
does not like
GetAttach = GetAttach & strFileFullPath & ";"
any idea on adifferent approach to the mypath, do you think that is the problem
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"
GetAttach = strFileFullPath
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"
Attachment1 = GetAttach
attach.Text = Attachment1