Changing Temp Dir

Apr 27, 2009

When opening 1 of my files (made to be used by others) a lot of .tmp and .emf files are made. When I close the file most, but not all, are deleted and new ones are added. Simply deleting all .tmp/.emf files doesn't work because some are still in use (by other files).

There for I have made a bit of code that checks if direcory "C:...Temp|Temp_PandL" exists. If not, then it will be created:

View 14 Replies


ADVERTISEMENT

Divide Without Using Temp Column

Feb 16, 2007

In A1 I have the value 60 I want it in 1:00:00 format

What I do is, I divide that by A1/24*60 and the copy that and paste-special-value on A1

Is there any way to convert the number 60 into 1:00:00 format without having to do calculation in temporary columns?

View 9 Replies View Related

Temp File Not Saving Macros

Jan 20, 2010

The form is completed by the project leader, then they hit a Command Button and it's sent to the Senior Manager. After the Senior Manager looks at it and approves it, he then sends it on to Admin (me!) so the project can get set up on all of our systems.
We recently upgraded to Office 2007 (yes, we are a bit late!) and now the Macro that sends the form to Admin no longer works. An example of the error is as follows:
Cannot run the Macro "FY06-10 PROJECTS 19-Jan-10 08-32'EmailtoAdmin.EmailtoAdmin'. The macro may not be available in this workbook or all Macros may be disabled.

Here is the code that I use to send it to the Senior Manager:
Sub MailtoSM()
Dim FileExtStr As String
Dim FileFormatNum As Long
Dim Sourcewb As Workbook
Dim Destwb As Workbook
Dim TempFilePath As String
Dim TempFileName As String
With Application
.ScreenUpdating = False
.EnableEvents = False
End With
Set Sourcewb = ActiveWorkbook
ActiveSheet.Copy
Set Destwb = ActiveWorkbook

With Destwb
If Val(Application.Version) < 12 Then

FileExtStr = ".xls": FileFormatNum = -4143
Else.........

View 9 Replies View Related

Delete Temp Files Located On FileSever Via VBA

Aug 22, 2006

Right now the security settings on my server are set so that new files can be added by anyone but only a few people can delete them. Everytime Excel opens a file on the server it creates a temp file that it cannot delete due to the security settings. This means that I have to go in to each subdirectory and manually select then delete each of these temp files.

way to identify an excel tempfile, or a method for deleting these files with VBA?

View 9 Replies View Related

Activechart.export Not Renaming Temp File

Apr 20, 2007

I am trying to export a chart using the code below, the loops change the data that is used to produce the chart:

Dim strFilename As String
Dim strExt As String
Dim lngProfile As Long
Dim lngOption As Long
For lngOption = 1 To 3
Range("nmOption") = Choose(lngOption, "Existing", "Option 4", "Option 5")
For lngProfile = 1 To 4
Range("nmProfile") = "Profile " & lngProfile
ActiveSheet.ChartObjects("Chart 13").Activate
ActiveChart.ChartArea.Select
strExt = "gif"
strFilename = ThisWorkbook.Path & "Images" & _
Range("nmOption") & "_" & Range("nmProfile") & "." & strExt
ActiveChart.Export strFilename, strExt
Next lngProfile
Next lngOption

Each export command creates a file with the correct name but no data (0kb in size) and a temporary file that is the correct file type (I have tried both jpg and gif).

I could try and copy the temporary file, but why does Excel not finish the job? I have tried to put a loop in and also added DoEvents after the export but no joy.

View 4 Replies View Related

Excel 2003 :: Cannot Copy Worksheet - Temp File Location Error

Feb 13, 2013

Using Excel 2003 and cannot copy a worksheet and am getting this error:

File not found: CDocumentTempVB4B.tmp

View 2 Replies View Related

Macro To Copy Dynamic Sheet In New Workbook - Save As Temp / Mail And Delete

Sep 15, 2014

Code to copy the sheet that get selected by if-then-elseif statement and paste in a new workbook, save the workbook as temp, email it and delete it,

sub sending_mail

Dim OutApp As Object
Dim OutMail As Object
Dim rng As Range
Dim DataWB As Worksheet

[Code] ......

View 2 Replies View Related

Search Worksheet For Data In Multiple Textboxes On Userform - Display In Temp Worksheet

Dec 23, 2013

I have a workbook with 4 worksheet that store different type of data. It also has a userform that load at start of the application which is to search the data in the workbook. The userform has a combobox where the names of the sheets are stored. when the user selects say Sheet2 in the combobox, it enables the relevant textboxes on the userform and activates the worksheet at the change event. The userform has a search button that searches all the worksheets based on the text entered in a textbox.

The problem: how to search based on 1 textbox. What I want is: say for e.g the end-user selects sheet2 from the combobox, this intern enables 4 textboxes (Name, DOB, Nationality, ID #) on the userform. The end-user should have the liberty to enter data in 1 and/or any of the textboxes. The search should be performed, that if data is only in 1 of any of textboxes then give all rows that fit that criteria and display in a temp worksheet. if say the name and dob is filled by the user than what matches both should be displayed in a temp worksheet. if say dob, name and ID# given so the search button should narrow down to fit all 3 criteria and then display result in temp worksheet. As if mentioned data can be entered in either just 1 or any or all textboxes.

E.g. the worksheet is (Columns are Name, Nationality, DOB, ID#)

row 1 = name: Steven Martin, DOB: 27-may-1993, Nationality: Trinidad & Tobago, ID #: 1234567
row 2 = name: Gary Richards, DOB: 2-FEB-1993, Nationality: British, ID #: 456789
row 3 = name: David Cohen, DOB: 27-May 1993, Nationality: American, ID #: 98765
row 4 = name: Roberto McDonalds, DOB 21-Jul-1962, Nationality: British, ID # 654321
row 5= name: Gary Richards, DOB: 01-Dec-1978, Nationality: Australian, ID # 1234567

Now if the user enters only name as "Gary Richards" and search then row 2 and 5 should be displayed in a temp worksheet. if user enters name Roberto McDonald and ID# 1234567 then it should not display anything. if user enters DOB 27-may-1993 and nationality British and ID # 1234567 then as well shouldn't display anything and should a msgbox "no data found".

View 4 Replies View Related

VBA Code To Require Fields - Temporarily Save File Email It Then Delete Temp File

Apr 9, 2014

I have a spreadsheet where I want to require certain fields to be completed then I want to have that file auto emailed. I have learned that I do need to have the file saved before sending otherwise the data will not appear in the email, so with this I want to have the file temporarily saved emailed then the temp file deleted.

Here is the code I have so far but it errors on the blue text, I did change the TempFileName from = "Copy of " & wb1.Name & " " & Format(Now, "dd-mmm-yy h-mm-ss") to = [C16] & "_" & [B6] & "_" & [D6]

Private Sub CommandButton1_Click()
If Range("B6").Value = "" Or _
Range("d6").Value = "" Or _
Range("f6").Value = "" Or _
Range("E9").Value = "" Or _

[Code] ......

View 1 Replies View Related

Macro Which Saves Data From Temp Worksheet To Customers Worksheet?

Mar 17, 2013

Dropbox - Final.xlsm

Here is the above link. Am looking at a button which saves whatever is the temp worksheet row in the customers worksheet. The temp worksheet basically takes the data from the Quotations worksheet and places it in a row.

View 9 Replies View Related

Temp Macro To Rename Macro

Sep 8, 2008

Is it possible for a macro to rename a macro? I have a Temp macro that I want to rename to Auto_Open (or maybe auto_close).

View 9 Replies View Related

Search Folder For Files Containing &quot;Temp&quot;, Delete Files

Jun 26, 2008

Is there a code that will search a pre-determined folder for all .xls files containing the word "Temp", and deleting those files?

Example:
In the root of drive M, I have several Excel files. Anytime one of the original tracking logs is opened, a temp file of that log is automatically created. I would like to automatically search the drive and delete all files containin the word "Temp".

I've attached a picture of the directory tree, in case that will help. The file will always be named "PO Response Tracking - Temp#######.xls", with ###### representing a series of either 5 or 6 numbers.

View 14 Replies View Related

Changing Cell Color Based On Changing Values

Sep 16, 2009

This may have been answered on here but can not seem to find it. My situation is I have values in A1,A2 & A3 that are like counter reading so the value is always changing. What I am looking to do is change the cell color if one of the values is over 500 from the other two values. Say A1 is 3000, A2 is 3250 and A3 is 3500. I would like the cell for A3 to change color.

View 2 Replies View Related

Stop Procedure Window Changing When Changing Sheets

Sep 9, 2007

Moving between different sheets changes the procedure window, which is a good thing, but can also can be error prone and annoying to search through several windows searching for the procedure or module currently working on. Is there a setting somewhere to prevent VBE from changing the current procedure window?

View 4 Replies View Related

Changing Another #DIV/0

Jun 15, 2007

i have a spread sheet that has data based off other data based off other data in a continuous cycle.. i know how to hide the #DIV/0 using VBA but what i want to do is change it to another name..such as N/A untill the data is being entered.

so #DIV/0- N/A

View 9 Replies View Related

Changing Mm/yy To Mm/dd/yy

Feb 16, 2007

I have imported data, in text format, that has just the month and year (02/09). I need to convert that to month, day and year(02/01/09). The day of the month isn't relevant, it can always be the first.

View 3 Replies View Related

Changing Columns Into One Row

Dec 12, 2008

I currently have 2 columns of data. One is a column of numbers, and the other is just commas to separate these values. How do I convert this into one row of data?

for example, I currently have:

row 1 | row2
324132 |,
324929 |,
010101 |,

How do i change it to

324132, 324929, 010101,

I will be able to use notepad/any other windows program

View 9 Replies View Related

Changing The Value Of A Number

Oct 18, 2009

Having trouble getting my head around this one...
i want to enter hh.mm eg. 3.30 and then use it for sums...

View 9 Replies View Related

Changing Numbers All By Itself

Jan 23, 2013

I have a simple spreadsheet for keeping track of gas mileage which I have been using for over two years with no problems. I have five columns A through E and right now I'm on row 72, that's where the problem started. When I enter the starting mileage in A and tab to B it changes the mileage number to a date and as my mileage number I type in changes the date also changes as I tab to B. See the sample below.

A B C D E
15357155968.491 28.14745024239
9/12/19420:00 10.44423.36269628244

The part that puzzles me is it does it in row 72, 73, 74, 75, and 76 then it goes back to working normal, and even though it puts the date in A and zeros in B it does the math right. I looked at column A and B for those rows and there isn't any formulas in them.

I Have a formula in column D =(B72-A72)/C72 and column E is just =B72-A72. Other then that the only other formulas I have is in column B row 177 it gives me total miles, in 178 it gives me total gallons, and in 179 it gives me average MPG.

View 3 Replies View Related

Color Changing Across A Row?

Dec 10, 2013

I am looking for a way to change the fill color of a row to just a portion of a row based on a on cell in the value on on cell in the row. I understand it should have something to do with ifthen but not realy sure of the exact phrases.

View 7 Replies View Related

Changing Tab Color With VBA

Jul 29, 2005

I am running a macro to copy the formats of one sheet to the next
sheet. One of the formats that I need to copy is the tab color. I
have the macro recorders code but it is for a specific sheet

Sheets("Jun-94").Select
ActiveWorkbook.Sheets("Jun-94").Tab.ColorIndex = 53

View 12 Replies View Related

Changing X Axis Value

Nov 18, 2008

I have modified the Run as Regular Macro code from this site to only changing the x axis, select different cells and I also only used object 1 instead of the name of the chart.

The problem is that when it is run which ever value is changed last, minimum or maximum, it will turn on auto and mess it all up.

View 2 Replies View Related

Changing Vlookup Value In VB

Nov 30, 2008

I have the below formula....

View 6 Replies View Related

Password Changing

Sep 1, 2009

I was working on a workbook that unhides certain sheets depending on who's logged in. It seems to work fine. However, after it's run (and sheet2 has been unhidden), when I go to unprotect the workbook, the password ("test") no longer works.

View 5 Replies View Related

Color Changing In Vba

Sep 16, 2009

I added a text box to my sheet with this

View 5 Replies View Related

VBA Changing File Name

Nov 18, 2009

VBA Changing file name
I'm currently using this code found on Mr Excel

View 5 Replies View Related

Percentage Changing The 0

Aug 16, 2012

=IF(AE6="","",LOOKUP(AE6,{0,0.8,0.9},{"Failed SLA","Borderline SLA","Passed SLA"}))

The above formulae I have works but this changes this to failed when a 0 is shown in the field.

This 0 is shown in the field this is due to the item having no data how can I cahnge the formulae so the cell stays blank

View 6 Replies View Related

Changing UDF To Macro

Feb 8, 2013

I found the following function in an old thread.

Public Function cleanString(fNameStr As String)Dim i As IntegerConst BadChars = "=+/'*?).,#%~!($[]÷™©" For i = 1 To Len(BadChars) fNameStr = Application.WorksheetFunction.Substitute(fNameStr, _ Mid(BadChars, i, 1), "") Next i cleanString = fNameStr
End Function

How would this be modified to work as a macro on selected cells (with selection?) I lost the formatting

View 3 Replies View Related

Changing Name Of Sheet Using VBA

Apr 7, 2013

I have a workbook with multiple sheets. Each sheet has a title (just words in a cell). Is there VBA formula that will have the sheet take the name of the title and also chnage when the title name changes?

View 9 Replies View Related

Changing Icon

Oct 24, 2007

I'm using the bellow code which I think Igot from this site, to change the excell icon to my own, Only thing is that in the top left hand side of the workbook still says: "Microsoft Excel - My File Name". Does any of you fine people know how to get rid of the Microsoft Excel and show only "My File Name"?

Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Integer, ByVal lParam As Long) As Long
Declare Function ExtractIcon Lib "shell32.dll" Alias "ExtractIconA" (ByVal hInst As Long, ByVal lpszExeFileName As String, ByVal nIconIndex As Long) As Long

Const WM_SETICON = &H80

Sub setExcelIcon()
Dim lngXLHwnd As Long, lngIcon As Long, strIconPath As String

strIconPath = "My Path:MyIcon.ico"
lngXLHwnd = FindWindow("XLMAIN", Application.Caption)

lngIcon = ExtractIcon(0, strIconPath, 0)

SendMessage lngXLHwnd, WM_SETICON, False, lngIcon

End Sub

View 9 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved