Set Default File Type (non Standard)
Jan 26, 2010I cant seem to get the file filter to be what I want. I want to et the default file filter string to "MOT*.xls". With the code below I get "*.*" and no option for my own filter value.
View 6 RepliesI cant seem to get the file filter to be what I want. I want to et the default file filter string to "MOT*.xls". With the code below I get "*.*" and no option for my own filter value.
View 6 Repliesis it possible to change the settings on your computer so that when you open Excel, it opens it as a certain type of file? I like working with .xlsb because I work with large sets of data all of the time and find that they open faster and are faster to work with. Currently every time I open Excel, it opens as .xlsx.
View 1 Replies View RelatedWhat I am trying to do is that I have an excel file with macros and it is a read-only file. In order for the user to save, I want them to only be able to save as a .xlsx file as it disables all macros. If for whatever reason, the user wants to save the file as another .xlsm file, they should be allowed but before they save, a "are you sure you want to save as .xlsm?" message should pop up.
All the options in the save as box should still be available in case they want to save in that particular format. Just that the .xlsx should be the default.
I was just wondering if there was a way of changing the excel chart default so it doesn't always return a grey (or gray for those of you over the pond !) plot area every time I create a chart. It looks rank and wastes toner IMO.
View 8 Replies View RelatedI used Excel 2013 and Win 8.1
When I insert a Hyperlink in a cell, this changes the Default Font Type and Size
I am trying to open a website, then for excel to download the csv file, then for it to save it in a specific folder under a specific name and file format (excel).
I am successful at opening the website with the following code, but how to do the rest.
Sub Searchez()
Dim IE As Object
Set IE = CreateObject("InternetExplorer.Application")
IE.Navigate "http://quote.morningstar.ca/Quicktakes/stock/keyratios.aspx?t=clwr®ion=USA&culture=en-CA&ops=clear" 'load web page google.com
IE.Visible = True
While IE.Busy
DoEvents
Wend
'IE.Navigate2 "javascript:SRT_keystuts.exportcsv()"
'this is the name of the download link as from when i hover my pointer over download link.
End Sub
I have a macro-enabled template file in Excel 2007. I would like the user to be unable to save in any format other than macro-enabled. They should be free to choose a path and filename, but not the file type.
I presume this means some VBA code in the before save event, but I don't know what.
Using Excel 2010
As I am looping through files in a folder, I would like to determine if the file is a text file.
The problem is that all extensions are variable in a pattern such as .078, .051, etc.
In this instance, the extensions are numeric, but I'm trying to figure out a way to handle that is all encompassing to include *.txt, *.tsv, *.csv, *.prn, etc......
How can I handle these efficiently?
I have had my server removed that I had my default file location, when I go in to change any of my options the first thing it does is go look for this file location and brings back an error stating it cannot find the server. I cannot find anywhere else that I could change it.
View 9 Replies View RelatedI have a VBA working fine to convert 30 files from cvs to xls, but it keep asking me the files is already exists in this location, Do you want to replace it. I have to repeat this step 30 times.
Sub CSVtoXLS()
Dim wb As Workbook
Dim CSVPath As String
Dim CSVCount As Integer
[Code]....
When I converted excel to text file via VB code, the default text file is tab delimited. Why is it so?
I've done:
Code:
Sub ConvertToText()
ActiveWorkbook.SaveAs Filename:="E:EXCELTEST.txt", FileFormat:=xlCurrentPlatformText, CreateBackup:=False
End Sub
Can I change the default delimition to pipe, how can I do this? How can I make an excel file to pipe delimited text file in default?
I'm using Excel 2010. When I go into the Excel Options, to the Save option and try to type in a specific network drive in the Default File Location: box, I click OK and then it doesn't save the changes. I close Excel down all the way and then restart a new Excel session and it keeps going back to "LibrariesDocuments..."
It doesn't seem to be just related to Excel...having the same issue in Word and Access 2010 as well.
Is there any way of making the default directory location for application.getopenfilename work properly with shared locations?
Presently I use ChDrive then Chdir but I cant use ChDrive if workbook is opened from a link in email for example. Please see below
I have a VBA routine that asks the user to load an existing file on startup.
I want the window for the file selection to open at the same folder every time. (the folder is on a shared drive)
The workbook to run the code will always be located on this same share at a fixed location.
My present code builds the path to the desired opening folder by collecting the drive letter from the current working directory (which has to be done as everybody maps there shares to different letters here, its not guaranteed to be the same! )
then i ChDrive to this letter.
Then I ChDir to letter plus myKnowndirPath
This works fine, the window always opens at my required folder. But only as long as the user has navigated to the folder containing the spreadsheet and then ran it from there. Because that way a drive letter is available.
However i found that if i sent a link to the workbook or its home folder. And the user opens the link or a windows explorer from that link and then runs file from there.
Then it stops working beacause there is no local drive letter in the working directory path. i.e. working directory shows as
'network \shareddrive
ootafolderanother arget
instead of something like
J:afolderanother arget
how to create and add password to a default windows zip file using vba excel macro.
View 2 Replies View RelatedIs it possible to set the default page to open when clicking the file button? In particular, I use the recents feature a lot but never have I looked at the information on the information page. Everytime I click the file button I have to then select recents which is annoying.
View 5 Replies View RelatedI use an image analysis program ImagePro which can call Excel within it's macro language (which seems to be visual basic). I looked up on this site how the change the drive (ChDrive command). But still when the Excel section (after With oExcel) executes the default file location in the browser is in My Documents on the C: drive.
Prior to this code Excel has been launched by this ImagePro macro, and a file Cumberland Template has been opened from the C: drive. Now I would like to do a Save As, but have Excel start at the I: drive location.
I have been asked to fix a macro that is supposed to search column B and find any cells ending with .mov. Any row fitting the criteria is to be copied to Sheet2. The file is a internet traffic log and we are trying to determine the number of downloads we have on our video files, which are all .mov format. Sheet1 can exceed 3000 rows.
Here's what I have so far:
I am changing the file type association for .XLS to
C:Program FilesMicrosoft OfficeOffice11excel.exe
I'm using "Change" and "browse" to set it to that exact file. However it still starts version 12 (XL2007) which is dual installed with version 11 (XL2003).
I was successful in creating a shortcut that opens version 11, despite Microsoft's apparent attempt to thwart that; now I need to fix the file association. (Try to directly edit the Office links in your XP Start Menu - how the target is grayed out?
I am getting a Type Mismatch Error when I run the following code.
I need to have the name save as
06-01-2012 dispositions.xlsx
in a specific location that is in this line of code. When i have it put 'dispositions' first, it works, but i need the date to show first in the name. Am I missing an additional function or quotes?
HTML Code:
ActiveWorkbook.SaveAs Filename:="C:DataSales TeamReview DatabseDispositions" & Year(Date) & "" & MonthName(Month(Date)) Format(ActiveSheet.Range("H1"), "mm-dd-yyyy") & "dispositions.xlsx", FileFormat:=51
I have the below code to have the user select a pile path and save. what can I add to have the dialog box preselect the file type to macro enabled? the .xlsm extension is not doing it.
['save it under a new name
Dim fPth As Object
Set fPth = Application.FileDialog(msoFileDialogSaveAs)
With fPth
.InitialFileName = Worksheets("Project Setup").Range("f19").Text & "_ROM Estimate.xlsm"
.Title = "Save your File:"
.InitialView = msoFileDialogViewList
.Show
End With]
I've been searching all morning through various posts on this subject, but I can't find anything that I can adapt to my needs. Here is the code I have:
ChDir "C:Documents and SettingsmynameDesktop"
ActiveWorkbook. SaveAs Filename:= _
"C:Documents and SettingsmynameDesktopBook1.txt", FileFormat:=xlText, _
CreateBackup:=False
This file will be used accross multiple computers and therefore the directory will always change. What I need to hapen, is for this code to save the workbook in the same directory as the origional file. I also want the file name to refer to a cells value, as I will be having the user define the name through a userform.
I need to open about 2000 documents one at a time, and save them with a different name.
they are a mix of word documents, PDFs and .jpg pictures.
some VBA like:
Open.file strPath & nextfile
where strpath = C:Temp
and nextfile = picture01.jpg
What should the line be? or is it more complex than a single line ?
I have a macro that I found somewhere on the net to look within a folder and list all the files of a certain file extension.
The macro to do this is in the attached example and is called 'Get_File_Names_Within_Dir_ext'.
I have created a basic userform outline, 'UF1' for the user to define:
Select File Extension
Select Folder to Search
Destination Sheet
I just don't have any idea how to sync the two.
If you type 'exe' into 'TB1_File_Extension' of 'UF1' the macro should search for '*.exe' files within the specified folder.
The search folder 'RefEdit1' box should open a windows explorer box (or some such) so that the user can select the directory in which to search for the previously specified file extension.
'TB2_Destination_Sheet' is a text box for the user to type the sheet within the workbook in which to list the files found within the specified directory.
'CB1_Find_Files' should activate the macro to find any files for the specified criteria.
There is also a Button 'Find File Types' in Sheet1 of the file which should activate the userform 'UF1'.
I had a working subroutine which I moved to another workbook (rather than linking to it and having both workbooks open at the same time).
Now I get "user-defined type not defined" when it runs. Here is the beginning of the
Global oApp As Object
Sub UpdateForecasts()
Call Update1
Call Update2
End Sub
Sub Update1()
Dim dPath As String
Dim dDest As String
Dim dCondition As String
Dim dName As String
Dim FSO As New FileSystemObject
1. Is there a VBA Function equivalent to the FIND() function, If so What is it?
2. Let's say Im Putting a Date into a inputbox, what is the type # for date (Type:=?)??
Just like sumif and averageif, is there a standarddeivationif?
View 1 Replies View RelatedIs there anyway to do a standard dev w/o the max + min in a range of numbers?
View 8 Replies View Relatedhow can i calculate standart error of mean of a sample?
View 2 Replies View RelatedI'm getting a time data on the format "0h 00m 00s" but I can't convert it to a standard "00:00:00" format to properly handle it and I'm not so Excel savvy. I already tried looking for something on google but the formulas for similar issues "0h 0s" or "0d 0h 0h" are not working (I can't find a way to adjust them). For example: I'm have the following data on G3:
0h 37m 52s
and I'm using the following TIME/FIND formula:
=TIME(FIND("h",G3),FIND("m",G3),FIND("s",G3))
but the outcome is "2:06:10" instead of "0:37:52"
I use Excel 2000.
I want to hide all toolbars when I work.
I know how to hide them during a session, but when I exit and reboot Excel, the "standard" toolbar always returns.
Is there some way to hide the "standard" toolbar permanently?