Dir Function Doesn't Show Files?

Apr 17, 2013

I am trying to write Excel VBA on Mac. Need to use the Dir function to get the file name in my document folder, but it showed only one file in the folder "DS_Store". There are actually several Excel files in the directory just don't show up by using this function. I have done some research on this "DS_Store" file, it seems a hidden/system file for Mac. It's fine, but it really doesn't make sense that other files won't show. Also, when writing VBA for Windows, *.xls refers to any file with a .xls extension. How to express the same thing for Mac? I am new with Mac, it just works so different than Windows.

View 9 Replies


ADVERTISEMENT

Formula Doesn't Show The Date...

Jan 26, 2010

I m writing this formula in a cell but i dont receive the result i want...

Formula used... ="Program "&""&G2
(G2 is a Date)

This is te result i get...Program 40210

This is the result i want...Program 1-Feb-2010

View 2 Replies View Related

Excel VBA Combobox Doesn't Show List

Jul 24, 2014

I created a user form in which i have a combo box. The combo box has the list

apple
orange
mango

So the combo box shows up the list only when something is typed on it ex:dot(.). i want to show the list by clicking on the down arrow of the combo.

View 1 Replies View Related

Loop Through Set Of Files And Check If File Doesn't Exist?

Feb 11, 2014

My problem is that I want to loop through a directory that contains csv files. The directory is dynamic so everytime could be a different number of files inside. I want the loop to go through each file and check if that file exists. If it doesn't to print a message that this specific files doesn't exist. Until now I got the following code:

[Code] .........

I guess I should somehow place the counter j inside the Dir path in order to check if everytime time the file[j] exists?

View 6 Replies View Related

Excel 2010 :: Inspect Document Doesn't Show Anything

Jun 30, 2014

In my Excel 2010 workbook I wen through File > Info > Check for Issues > Inspect document. But as it's shown following, it doesn't show anything. Why?

Capture.jpg

View 5 Replies View Related

Userform Data Doesn't Show In TextBoxes On Another Sheet

Feb 23, 2012

I have a workbook with 3 sheets.

Sheet 1 is a sheet that has a shape with macro assigned to show Userform6.

Sheet 2 contains data that is displayed on Userform6. I use Userform6 to show statistical data that is on Sheet2.

Sheet 3 contains data that is input to ComboBoxes on Userform6 using the RowSource Property.

On Sheet 2, when I select Userform6, the data is correctly shown in all comboboxes and Textboxes......

On Sheet 1 when I select Userform6, only the comboboxes show the data...the textboxes do not show any data.

I do not want users to see the data on Sheet 2 which is why I want to show the Userform on a different sheet as the data sheet will be hidden from users.

Question is: How can I show Userform6 on Sheet 1 with all the data showing in textboxes?

View 9 Replies View Related

Open All Excel Files In Directory - Code Doesn't Work For One Specific Path

Feb 8, 2014

I have my code here:

VB:
Sub openfiles()Dim Path As String
Dim ExcelFile As String
' Path = GetFolder("C:UsersKinteshDesktop")
Path = "C:UsersKinteshDesktopVBA programmingMaps"
ExcelFile = Dir(Path & "*.xls")

[Code] ....

NextCode:
GetFolder = sitem
Set fldr = Nothing
End Function

My problem is that the code all actually works (including the function and when I use the commented part), but pointing to this one specific directory (the one I'm using right now), literally nothing happens.

View 6 Replies View Related

Remove Modules In Multiple Open Files Results In Error If Module Doesn't Exist

Jan 30, 2008

I have a number of similar templates on a server used to produce quotations from other files with lookup formulas. They all have 2 modules, 3 & 4. Module 3 deletes certain data and shows values instead of formulas for most of the pricing etc. Module 4 contains a macro that logs info in another central workbook on the server.

If 2 files are opened based on the same template at once, when the Quote_Wrapup macro (in module3) is run on one of the open files(code follows) from a button on the spreadsheet it often produces a Run-time error '9' Subscript out of range error.

Sub Quote_Wrapup()
'To stop screen flicker
Application.ScreenUpdating = False
Range("D8:E9").ClearContents
Range("D8:F9").Interior.ColorIndex = xlNone
Range("qdata5").Font.ColorIndex = 2
Range("qdata6").Font.ColorIndex = 2
Range("A18:A1018").SpecialCells(xlCellTypeBlanks).EntireRow.Delete
Columns("A:E") = Columns("A:E").Value
Range("A980") = Range("A980").Value...................

View 8 Replies View Related

IF Function Doesn't Work?

Apr 25, 2014

i checked and checked and my IF function just gives me the wrong answer... attached is just a sample data..i have over 230 lines to check actually..

View 4 Replies View Related

Match Function Doesn't Find Values

Feb 5, 2009

I've been using a Index and Match Functions to locate values,

What I'm trying to do is as follows:

Column A contains x values and Column B contains another value

A length is entered at the top of the worksheet, when the x value is greater than half the length the values will be mirrored about the centre point.

To do this i'm doing x-(length/2) to give the corresponding value of x on the other side of the length

I can do the If functions etc to sort all this out, but the match function isnt working, see attached, it isn't finding values which are in the list, when i use 0 for exact match, i've tried using 1 but it still isn't finding the correct values.

View 2 Replies View Related

VBA Left Function Doesn't Work With Text?

Mar 23, 2012

HTML Code:
If Left(Range("H18"), 7) = A23C567 Or Left(Range("H18"), 7) = A65C321 Then
ActiveSheet.Cells(6, 7).Value = "Business and Private Banking"
End If

Im trying top use the above bit of code and it does not work when the criteria is Text , so if I simply change the above to =1234567 it works fine -- But I need it to be alpha numeric

View 6 Replies View Related

COUNTIF Doesn't Like HOUR Function Inside Of It

Jun 24, 2014

The first three formulas give valid results but the fourth example throws in an error after hitting Enter. As you can see I put in the HOUR function. As far as my knowledge goes the HOUR function generates an integer.

So why does C4 not work? Formulas go in column C

A
B
C

1
22
20
1
=COUNTIF(A1,">"&B1)

[Code] ........

View 2 Replies View Related

Min If Function Doesn't Work For Earliest Date Lookup

May 23, 2014

I am having issues with a min if formula, even though i enter it as an array (ctrl +shift+enter), it only returns a zero.

The formula is supposed to return the earliest date from Raw data if the name of the company matches the one from the data validation ('Company lookup'!D3).

Dates are in column D and company name in column M

I checked, the dates are all formatted as dates

=MIN(IF(RAW!$M:$M,'Company lookup'!D3,RAW!$D:$D))

View 3 Replies View Related

Match Function Doesn't Find BLANK Cells?

Oct 27, 2009

I'm surprised and confused as to why =Match("",A1:A300,0) doesn't find blank cells in the "who does what" worksheet of the attached file.

View 2 Replies View Related

Trim And Clean Function But Formula Doesn't Work?

Jan 31, 2014

I'm coping and pasting data (html) into a worksheet. When I try to format some of the columns as accounting$, number, ect. They won't format. It looks as if there are spaces before and after the data. So I tried the trim and clean function but it doesn't work, so I guess the blank "spaces" are not really spaces.

It gets better...

When I do the same exact copy and paste (as html) on another persons computer, they are able to format just fine, and the "spaces" are removed automatically.

Why is this working on one computer but not the other? Is it a setting that my computer has enabled or disabled? If so, what is it?

View 1 Replies View Related

UDF Working When Called From Sub, Doesn't Work As Worksheet Function

Mar 28, 2009

I have written a user-defined function that searches for a small range within a larger range. The function requires two input parameters: the range you are looking for, and the range you want to look within.

For example, I might look for the string of values in cells A1:D1 in a larger range E1:H20. The function returns the row number in the larger range where the smaller range is found.

My problem is this: The function is working fine when I call it from another sub procedure. However, when I try to run it as a worksheet function, I get a "#VALUE!" error. The function pops up in the "insert function" menu, and it prompts for the two input parameters.

View 6 Replies View Related

Command Button To Display Calendar Doesn't Function Properly

Mar 17, 2014

Userform1 on the attached file has a "Calendar" button to display a calendar that allows the user to select a date and have it placed in the Date Text Box. It simply doesn't work unless you click on the userform area where the calendar should appear - but how would the user know that?

View 2 Replies View Related

Excel 2007 :: Mouse Wheel Scroll Function Doesn't Work

Feb 8, 2012

I'm using Excel 2007. When I try to scroll with the mouse wheel, it doesn't do anything. If I hold down the control key and scroll with the mouse, it zooms in and out. So that works fine, but I can't do the basic scrolling up and down the document with the mouse wheel. There is no "Tools, Options" menu in 2007 so I don't even know where to find this type of option. The options available from the Office button are completely different.

View 4 Replies View Related

Show Insert Function Dialog Pre Set To Function

Sep 14, 2006

A most of time I'm using VLOOKUP function. I want to call specially this function by pressing custom button (w/o pressing "Insert Function" and choosing VLOOKUP)

View 4 Replies View Related

Show Multiple Open Files On Task Bar

Jul 30, 2007

I do'nt know really my problem is regarding excel or with windows, actually stange thing starts happening, I open multiple excel files but only one general excel instance is showing on the task bar. If I need to switch between the file I have to minimise the one I am using and then select other to open it. Even shortcut Alt+Tab switch is not working to switch between the excel files.

View 9 Replies View Related

List & Show Image Files In Folder

Aug 7, 2007

Suppose i have a directory on my HD with 100 images. Now i want to show them all in one column (each in 1 cell),

View 3 Replies View Related

Modify Code So It Doesn't Run If Sheet Doesn't Exist

Oct 24, 2011

Code below. I need it to NOT run if the sheet week2 doesn't exist. Currently it gives a runtime error '9' out of range. This is due tot he sheet not being present because sometimes it is not generated.

Code:

Sub RemoveColWeek2sheet()
Dim ColNo As Integer
Dim rng As Range
Set rng = ThisWorkbook.Sheets("Week2").UsedRange

[Code] .........

View 6 Replies View Related

Open & Cross Match Files And Show Differences In Another Worksheet

Jun 24, 2009

I am running some VBA code that works fine, until I specify a filename that contains embedded blanks. Hopefully, the following code and screen captures will demonstrate what is happening. First the code that opens the files ...

View 8 Replies View Related

Excel 2010 :: Hyperlinks With JPG Files Using Internet Explorer Do Not Show Pictures On Win7

Jan 26, 2013

In Excel 2007, Hyperlinks in cells pointing to jpg files in a subfolder display with internet explorer. On my WinXP/Intnernet Explorer 8/Office 2007 system these links work fine.

When sending the excel and jpg files to another person with Win7/Office 10, jpg hyperlinks work and launch Internet Explorer but come up blank. (Hyperlinks to PDF files work fine and show up in Acrobat, just the jpg's come up blank in Explorer.)

Questions:
What is causing this, a setting in Explorer/Win7 or Excel?
Can I change Excel hyperlink default software to use something other than Explorer to display the jpg files?

View 5 Replies View Related

Click Help On This Function My "Help" Doesn't Open

May 31, 2009

Why when I click jelp on this function my "Help" doesn't open. opens only grey window....

View 3 Replies View Related

Why Doesn't My If Function Print An "X"

Aug 6, 2008

My function is Finding the inputted last name on another sheet then looking up the date at the top of the column and comparing it too the current date, However I can't get the current cell to = "X" when they do equal.

Private Sub ReturningRush_Click()
Dim Value7 As String
Dim strCheck As Range
Value7 = InputBox(prompt:="Enter LAST Name")
With Sheets("Attendance")
Set strCheck = .Range("B6:B200").Find(what:=Value7, LookIn:=xlValues, Lookat:=xlWhole, _SearchOrder:=xlByRows,
SearchDirection:=xlNext, MatchCase:=False)
If Not strCheck Is Nothing Then
Application.Goto strCheck
ActiveCell.Offset(0, 2).Select

View 9 Replies View Related

'indexing' Of Files (not Index Function)

Aug 29, 2008

I have a folder with about a thousand files in it, each one holds one worksheet.

What i need is a new file which lists all these file names in column A and, in column b, the value from cell A1 in each file against the file name, i.e.

book1 Apple
book2 Banana

I can list the files in the folder using dos, but cant rip the a1 cell values out,

so I need to open each workbook in turn, record the file name, and then record the value in cell A1 against it.

View 9 Replies View Related

Function To Count Files In A Folder

May 31, 2006

I'm trying to create a function to count the number of files in a folder then add one.

I'd like to refer to the function in my spreadsheet, so I can generate a new reference number for my sheet.

Here is the code I've used so far, which I've made reference to in my sheet by typing "=countfiles(Q3)" (Q3 contains the name of the folder I want to search in.

Function countfiles(ByVal foldername As Integer)

With Application.FileSearch
.LookIn = "C:Temp" & foldername
.FileType = msoFileTypeExcelWorkbooks
.Execute
nooffiles = .FoundFiles.Count
End With

countfiles = nooffiles + 1

End Function

When I use simlair code in a macro, it works:

Sub countfiles2()

With Application.FileSearch
.LookIn = "C:Temp" & Range("Q3").Value
.FileType = msoFileTypeExcelWorkbooks
.Execute
MsgBox (.FoundFiles.Count)
End With

End Sub

Obviously, I would prefer the function option, with reference to it in the cell.

View 5 Replies View Related

Loop Through Directories & Files With Dir Function

Jan 18, 2008

I am trying to do is loop through a series of directories under a target directory. When a directory is found, it looks within that directory and finds any .xls files, loops through those and copies/pastes them to the new target directory. I have managed to get it to work only on the first iteration of the loop through the directories, then it crashes. The error code is "Invalid Procedure Call or Argument." Here's the

If valFilePath = True Then
MsgBox (msg)
Else
'Search for directories within source directory
strDir = Dir(ebsSource & "", vbDirectory)
'If a file has been found
Do While strDir <> ""
If strDir <> "." And strDir <> ".." Then
strFile = Dir(ebsSource & "" & strDir & "" & "*.xls")
Do While strFile <> ""
'Copy .xls files and paste in destination
copySource = ebsSource & "" & strDir & "" & strFile
copyDestination = ebsDestination & "" & strDir & "" & strFile
FileCopy copySource, copyDestination
strFile = Dir
Loop
End If
'Crashes here after looping through the first iteration of Excel files
strDir = Dir
Loop

View 2 Replies View Related

Function That Will Show The Result In Column AD

Nov 6, 2008

I have a huge worksheet that contains four character payer code in column D for example: 9081, M897, 0235. I am looking for a function that will show the result in column AD

IF payer code in column D starts with a 9 (9???) - GOVT
IF payer code in column D starts with a 7 (7???) or M (M???) - MNGD
IF payer code in column D starts with a 2 or 0 (zero) – COMM
IF payer code in column D starts with either Z, I, C - PTR

I tried IF function, but it didn’t work for me.

View 3 Replies View Related







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