Free Microsoft Excel 2013 Quick Reference

I need Code to open DBF file in an excel worksheet

Hi All,

Here is what I am trying to do. I have a button called "Open" which is
used to bring up the file open window code as follows: myfilepath =
myapp.GetOpenFilename(",*.dbf", , "Open File")

My questions is; is there a way that I can now add some code here so
that the file i choose opens in Worksheet1. Along the same lines as:

I cannot seem to get it working any ideas would be welcomed.


*** Sent via Developersdex ***

Post your answer or comment

comments powered by Disqus
If I select different excel files all are opened at the same excel window, I
want to open each file in each excel window, how can I do it?

how do i find and delete all empty rows in an excel worksheet that was
created by exporting a double spaced crystal report ?

I have a lot of bill laden numbers I need to keep track of in an excel
worksheet for accounts payable and I want to prevent entering duplicate
numbers. Is there a way I can have excel tell me when I have keyed a
duplicate number?

Thanks for any help.

I am trying to flip some text in an excel worksheet either as a block or opne
cell at a time. However the rotate command in the Draw toolbar is greyed out.
Anyone help?
Thanks Mick

Hello All,

I need code to open an Excel file in SharePoint (in Edit mode). The program currently reads:

Workbooks.Open Filename:="http://teamweb/sites/Plant%20Board/Results.xls"

When I launch this I get a "Could not open..." error.

Can someone help me rewrite?

Thank You.


I wish to open text files i excel usign VBA with a delimiter as ~....I dont know how do we refer to the Other delimiter option...Following is my code

Private Sub CommandButton1_Click()
Dim varFileName
varFileName = Application.GetOpenFilename("Text Files (*.txt), *.txt")
If TypeName(varFileName) = "String" Then
With ActiveSheet.QueryTables.Add(Connection:= _
"TEXT;" & varFileName _
, Destination:=Range("A1"))
.Name = "AddEmployee"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.TextFilePromptOnRefresh = False
.TextFilePlatform = 437
.TextFileStartRow = 1
.TextFileParseType = xlDelimited
.TextFileTextQualifier = xlTextQualifierDoubleQuote
.TextFileConsecutiveDelimiter = False
.TextFileTabDelimiter = False
.TextFileSemicolonDelimiter = False
.TextFileCommaDelimiter = False
.TextFileSpaceDelimiter = False
.TextFileColumnDataTypes = Array(1)
.TextFileTrailingMinusNumbers = False
.TextFileOtherDelimiter = True
.Refresh BackgroundQuery:=False
End With
End If
End Sub
Can neone please help


Please advise how to open CSV file in Excel without using "Text to column"
steps. Where I can make all needed settings in Excel in order CSV files being
opened immediately without making additional actions. Thank you.

How do I use this code to loop through all the files in a folder and perform
some action on each

With Application.FileDialog(msoFileDialogFolderPicker)
.InitialFileName = Application.DefaultFilePath & ""
.Title = "Please select the location of the RFDS folder"
For Each vrtSelectedItem In .SelectedItems
myFile= vrtSelectedItem
If .SelectedItems.Count = 0 Then
MsgBox "Canceled"
MsgBox myFile
End If
Next vrtSelectedItem
End With

What I am am trying to do is, select a folder and transfer all the
information on each file in that folder to a worksheet. The code above gets
me to the folder but I need to figure out how to now tell the code to open
each file in that folder so that I can perform the neccessary action on the
file, close the file and then open the next file in the folder.

I put a password on a file in excel 2003 to open it. Now I can't turn it off
even when I follow the instructions. By either going into Tools / Options /
Security and deleting there or by clicking on Save As and then clicking on
Tools and then General and deleting there and then saving but everytime I go
back to open the file it still asks me for the password.

Any suggestions?

Good morning,
I am about to complete another large macro and I am looking for help with the last step.

In my active sheet, column C, I have a list of unique file names. I would l like to write code to open every file in this range (the number of rows will change) and protect the file with the password in column D?

Here is some code I recorded manually :
Sub b()
' b Macro
' Macro recorded 6/2/2008 by Conde Nast Publications
    Workbooks.Open Filename:= _
        "G:PCard DirectoryCloses2008 and 2009 VISA P-Card Closes.xls"
    ActiveWorkbook.Password = "applepie"
End Sub

Thank you, as always, for all of the help!


I regularly want to open .CSV files in excel but the problem is that if I was to just open it it will convert certain entries such as 1-7 to 01-Jan.

I know I can use the import data wizard and set the columns to text, but as I need to open maybe ten files several times a day this is very time consuming and open to error.

Is there a way in VBA of writing a routine to do it

i am trying to open a file in excel but i am getting message file is read
only or encrypted..clicking ok then says excel says cannot access file. Any

Hi All,

Before reinstalling the Ms Office 2007
I was able to open the second, third, etc.
excel files simply by dragging its name
to the Excel icon on the screen. So I had
two or more files in separate windows.
Now it is not possible so using more than
one file in the same time is really difficult.

Could you help me please?


What would be the vba for a button to open a file in the same folder? I can't use a complete file path because its on a portable drive that is E: at work and G? at home.

The file name is UpdatedList.xlsm

Hi everyone. I'm writing this from my desk at the office. Three
colleagues and I have been given the unpleasant task of opening
innumerable (but simple) csv files from the net and then putting in
certain data to an Excel workbook.

My problem is this. While I can easily open the csv file in Excel (it
does it automatically as a window within IE), and get the data in the
correct format, nicely divided into cells, eg:

12 15 222 55

two of my colleagues cannot. They get:

Now, I know how to open text files so that Excel uses the commas to
separate the text into cells, but we do have to open about 5,000 csv
files so I don't want the whole hassle of specifying what Excel has to
do with each file.

We are all using Windows 2000 Professional. The conversion works well
with both Excel 97 SR2 and Excel 97 on two computers and does not work
well with Excel 97SR2 and Excel 97 on two other computers. Our PCs are
identical machines all bought at the same time!

Our IT guy says that somehow we must have originally specified that csv
files had to be opened one way or the other, and that this information
has been written to registry. Is this possible? Is there a way of
amending it so that csv files open correctly? Could anyone help,

I have the following code that creates a file.
ChDir "c:Temp1"
ActiveWorkbook.SaveCopyAs Filename:=Range("FF1").Text & " Closing Sheet" &
this code is used to create a file that is attached to a email. After the email is sent I need code to delete the file. I tried working with
but could not get it figured out.

When I use the command "C:data.dbf", I loose all the dbf
column format. Does anyone know a way to keep this information ?

If excel cannot give me the infos, I could ask to open .dbf with Access and
then, I could created a vector which could include all column format from
column 1 to n.
Any idea ?
Alex St-Pierre

Is there a way to save a .dbf file in 2007 Excel? Add-on someone might be
aware of? Is the omission being addressed with a patch? What a mistake!!!!!

Is there a limit to the number of formulas in an Excel worksheet? When I do a
function check on my formula, the function box shows the correct answer, so I
know my formula is correct. Currently I have about 250 correctly displayed
formulas on this one sheet, but I need to add 36 more.

I am trying to open a file in a program (Microsoft) by clicking on an excel

Initially I tried a regular hyperlink, but excel seems to ignore the
[filename] part of: c:directoryustation.exe [filename] where
[filename] is the actual name of the file. Excel only opens the program, not
the file as well. Where as this DOES work as a command prompt from a command

So I have written a function in VBA which does work. But I can't get excel
to execute the function when I click on the cell, like a hyperlink.

I need to use a Picture Box Control (the same used in VB) in an Excel Worksheet, so I can Load an Image and use the Point Property, where this property returns the value of the pixel in that point, in a hexadecimal format.

The property is accessed in VB like this:

value= formname.pictureControl.Point(x,y)

Does anybody know how to use this control in Excel? I have only found the image control, but it doesn't have as much properties as the picture box control.

Edit: cleaned post by Jack in the UK

Use ~* to search for *
"Gigs" > wrote in message
> How do I find an asterisk * in an excel worksheet utilizing the find
> command?


I am trying to automatically number rows in a worksheet. I have used the
=ROW(A1) function and that works alright, BUT it doesn't re-adjust
automatically after a row has been deleted or inserted. I also tried
selecting the range and creating it as a LIST, which works when we delete a
row, but when I insert a row, I have to double-click on the cross-hair on the
bottom right corner of the previous cell.

Does anyone know a way around this?

MANY thanks!!

I would like to hide or display rows in an Excel worksheet based on a
variable set on other worksheets. Is this possible?

No luck finding an answer? You could always try Google.