Opening Subfolder In Mainfolder?

Nov 29, 2013

what I am doing wrong in this script to open a subfolder with a name starting with the value in cell (1,1) ?

VB:
Option Explicit
Sub FolderInfo()
Dim fso As New FileSystemObject

[Code]....

would this code also look in the subfolders of the subfolders? I'm looking for this function also

View 6 Replies


ADVERTISEMENT

Create Folder And Subfolder With Name Based On Cells

Mar 12, 2013

I need to activsheet create in .pdf witch i did with this

VB:
Sub Save_As() ' macro za snimanje racuna u PDF pomocu Microsoftovog ugradjenog alata za Office 2010
Dim txtName As String
txtName = "D:
eports" & Range("G14") & "_" & Range("L3") & "_" & Range("E18") 'ime nove datoteke i folder u koji se snima
ActiveSheet.ExportAsFixedFormat _
Type:=xlTypePDF, _
filename:=txtName, _
OpenAfterPublish:=False
End Sub

and for that pdf file i need to create folder based on cell e.g. q1 and sub folder l3 and all that in case that they dont exist and if they are just put file in it. For example i fill out sheet (one of many in one day) and i click buton and sheet go to pdf in subfolder L3 in folder Q3.

View 1 Replies View Related

Get A Macro To Look In A Subfolder Relative To Its Current Directory

May 28, 2014

This Macro (Located within "SWMS Auto-Fill.xlsm) scans the folder its in and transfers information into select cells within each .xlsm file it finds. However I need to move the SWMS Auto-Fill.xlsm file to the parent directory.

So I need it to scan: Workbook DirectorySection4

Code is below:

VB:
Sub Autofill_SWMSs()
Dim MyPath As String
Dim MyFile As String
Dim Wkb As Workbook
Dim Cnt As Long

[Code]....

View 1 Replies View Related

Code To Create Folder And Inside Subfolder

Mar 7, 2014

The code below is sending back an error. It's supposed to create a folder and a subfolder within it and if the folder already exists then a msg box should pop up saying that folder already exists.

[Code] ....

View 14 Replies View Related

Outlook Macro Code To Get Attachments From More Than One Subfolder

Jun 12, 2014

Getting attachments from outlook subfolders.

My attachments are in Inbox > First subfolder (sales) > second subfolder(Sales 1)

I need to save attachments from second subfolder (Sales 1) to my drive.

Currently i got macro which picks up attachments from first subfolder (Sales). The macro code is

Sub SaveAttachmentsToFolder()
On Error GoTo SaveAttachmentsToFolder_err
Dim ns As NameSpace
Dim Inbox As MAPIFolder
Dim SubFolder As MAPIFolder

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

View 2 Replies View Related

VBA Code For Adding A Specific Worksheet Condition Within Subfolder Consolidation Macro

Aug 22, 2013

The issue is the I want to put the condition here in my the code that only copies the desired cells if the sheet is named specifically such as "Jan", if not named as this the worksheet should not be used. The current code I am using was posted on this site in 2009: VBA to copy specified cells from all the files in a folder

My modified code is:

Option Explicit
Public strSourceFldr As String
Public EachFile As Object
Public objFSO As Object
Public objFolder As Object
Public objFile As Object
Public strSheetName As String

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

View 1 Replies View Related

Opening A File Without Opening A Workbook

Apr 17, 2007

I have a need to open a file from my companies intranet. My current method was to open said file via the method that the recorder gave me. However, I would like ot be able to open a said file without having to start open another workbook.

This is the path:
[url]

So the command is this:
Workbooks.Open [url]

Links are not actual links

So what I need to know. Is how can I open this file without opening a workbook. I haven't been able to use the VB "Open Statement" to open a file and I don't believe that I've been successfull using the Filesystem object either.

View 9 Replies View Related

Opening IE6.0 From VBA

Mar 27, 2007

How do you open IE6.0 from VBA

I tried:

Dim IntApp As Object
Set IntApp = CreateObject("Internet.Application")
With IntApp
' Change file name to suit
.Documents.Open Filename:="http://web addr/"
.ActiveDocument.Select
.Selection.Copy
End With

Get error: ActiveX component can't create object

View 9 Replies View Related

Msg Box To Appear Once On Opening

Jul 28, 2007

I am using the following to code with a warning message. However this warning message appears each time the macro is run? Can this be modified in such a manner so that it will show the warning message only once for first time it is run on each opening of WB?

Sub mln()
Dim a
a = MsgBox("Please note that this will replace formulae with value.So you are requested to run this on a copy of the file.", vbYesNo + vbExclamation, "Important")
If a = vbYes Then
For Each c In Selection

c.Value = Application.WorksheetFunction.Round(c / 1000000, 2)
Next c
End If

End Sub

View 9 Replies View Related

Pop Up Box Upon Opening

Jan 2, 2008

i've been working on VBA for a file that i'll be sending out to a bunch of people. There are three questions that i want answered after the file is opened...not allowing them to proceed until they enter data.

1. Please enter Management Unit.
2. Please enter GL Account. (US only)
3. Please enter Earnings Code. (Non US employees)

The first question MUST be answered with a 6 digit number. The 2nd and 3rd may or may not be answered. simply hitting is acceptable.

After that i would like the answered populated in 3 rows below the lastrow in column B. thus, if there is data in B50, then answer 1 in B53, answer 2 in B54, and answer 3 in B55.

And if "MU:" could proceed the answer to 1, "GL:" before answer 2, and "EC:" before answer 3.

View 9 Replies View Related

Opening New IE Tab Instead Of A New Window?

Feb 6, 2013

i have a macro that performs the same search in many websites, opening a new ie window for any site. What i want now is opening a new tab in IE instead of a new window. To illustrate, here go some code:

VB:
Dim PartNo As String 'Declaro la cadena de texto que determina la busqueda
Public Sub BuscarPLCCenter()
Dim IE As InternetExplorer

[Code]....

I would like that all of these procedures opened a new IE tab to do the search, cause actually it opens like 15 windows at a time and is not user friendly enough.

View 4 Replies View Related

Workbook Keeps Opening By Itself?

Jun 12, 2013

I have just added some code to make my workbook close after it has been inactive for 5 minutes...this works fine except it opens itself up again after 5 minutes. If I select 'Enable Macros' it closes immediately and if not, it will stay open.

Here is all of the code I put in for the auto shut down:

ThisWorkbook:

[Code]....

Module 1

[Code] ....

View 3 Replies View Related

Opening In Different Workbook

Jan 6, 2007

I currently have a workbook that, when opened, automatically kicks off a macro (with a call from the Workbook_Open event in ThisWorkbook). I was to run that same called macro from a custom button that I put on a toolbar in Excel itself...which is pretty straight forward. However, when I do this, the macro kicks off twice...once from the button and once because the called macro's workbook opens and kicks off the macro with the Workbook_Open event.

So, what I was thinking was...is there a way to tell if a workbook is being opened by another workbook (by calling it's macro) or whether is was opened "normally (manually)"?

View 9 Replies View Related

Opening All Folders

Jun 20, 2008

I have about 20 plus workbooks in a folder. Each has 52 sheets, Fridays date, that I want to copy all the data from each sheet.

Is there a way to open all workbooks in a folder and copy all data from on all the various sheets into a single workbook?

I'm trying to gather the info and make a small data base from the various books. I'd like not to have to call each workbook by name as the file names change or get added to.

View 11 Replies View Related

Opening CHM Files With VBA

Aug 14, 2003

How can I use VBA to open a .chm file. I tried using many different methods but with no success, i.e. openfilename.

View 6 Replies View Related

Opening Two Workbooks Using VBA?

Feb 6, 2014

I have a spreadsheet that I need to open two other workbooks to copy and paste data from.

The name of the two workbooks changes each day, and the location because they are filed in subfolders.

I have the following code, which works to open the first sheet but then comes up with the following error when trying to open the second sheet. "Run-time error '1004: Excel cannot access 'Hub PVA'. The document may be read only or encrypted".

The folder is not encrypted because when I was only opening the second document with the same code, it worked.

The code I am using is:
'DECLARATION
On Error GoTo ERR1:
ChDir "G:GENERALTRANSPORTDAILYPLANS"
Workbooks.Open Filename:="G:GENERALTRANSPORTDAILYPLANS"

[Code]....

View 3 Replies View Related

Opening A Dialog Box

Jun 17, 2005

ive created a spreedsheet for work calculating money etc from different tills. is there a way i can have a box appear when the spreadsheet is opened asking for particular information to be entered.

EXAMPLE: ....

View 9 Replies View Related

Opening Files Using Vba

Jun 11, 2007

i wish my vba program to enable the user to select a file to open from the regular 'open file' dialog box.

in addition, I wish to be able to list the filenames in a user form that have already been saved in a specific directory.

View 9 Replies View Related

Opening A File ...

Sep 18, 2008

I am trying to do something simple but not quite sure how to do it. I am using the GetImportFileName and then selecting information of one sheet from that file and copying to another workbook. I need to know how to then get back to the file I have opened to search the next sheet and so on. The problem I have is with this line.

Workbooks(FileName).Activate

Sub GetImportFileName()
Dim Finfo As String
Dim FilterIndex As Integer
Dim Title As String
Dim FileName As Variant

' Set up list of file filters
Finfo = "All Files (*.*),*.*"

' Display *.* by default
FilterIndex = 5

' Set the dialog box caption
Title = "Select a file to Import"

' Get the Filename
FileName = Application.GetOpenFilename(Finfo, FilterIndex, Title)

' Open the Filename
Workbooks.Open FileName

WPD
End Sub

View 9 Replies View Related

Opening PDF File

Mar 12, 2006

When I press the button , i would like to open PDF file. The path is "\ engineeringABC.pdf"

View 2 Replies View Related

Opening CSV Files As Is

Apr 25, 2006

I am trying to view a csv file that has string data, some of them like '395E02'. Excel automatically converts this string into an exponential number. Is there any way to stop Excel from performing the conversion so I can read the number as is?

View 8 Replies View Related

Opening And Using Emails

Jun 16, 2006

In a desperate attempt to find a solution, I thought I would try what seems to be a very good and helpful forum filled with loads of expertise (yes I'm creaping here).
Out current mainframe systems churns out *.DOC reports for various managers all the time. I am trying to extract the data from these *.DOC files to a meaningful Excel spreadsheet. The first hurdle is killing me and I know that once I get past it I will be heading for the finish line. The email that comes to the inbox has the same title each time. I would like to open the *.doc file in excel, do my calculations and then move the email message to another email folder ready for deleting.

View 4 Replies View Related

Always Opening On The Same Worksheet

Jul 8, 2006

I have a workbook with loads of various worksheets,, which is shared between a group of us.

What i want is that each time the workbook is opened it always starts on the same worksheet called 'main'.

View 5 Replies View Related

Workbook Opening Twice

Nov 9, 2006

My friend emailed me a workbook. When she or I open the workbook, it opens two instances of it. Is there an option in excel that is causing it to do this? I need to send this a client and I do not want this to happen on their side.

View 6 Replies View Related

Opening Frame On Another In UserForm

Jun 25, 2014

I have a UserForm (UserForm61) where I have a popup calender acts like DTPicker. and some other controls . My Problem is whenever I am trying to open the calender it is opening behind every control. changing the z order played no role.

View 9 Replies View Related

Opening Workbook On Sheet 1

Apr 23, 2014

I have a workbook that consists of 3 sheets, it's a template I use. Once I am done filling out sheet 3, I save as a new workbook. When I have to go back to the template workbook it always opens on sheet 3. Is there anyway that once I open the template workbook it will open on sheet 1?

View 1 Replies View Related

2000 Opening Files

Mar 12, 2007

Last monday I clicked on my quick launch icon for my time card, which is in excel. It opened up, but I got an error message saying that excel had an error, send report or don't send report. Closed everthing out and clicked on the icon again, but this time excel oppend but the file did not. I get just a blank (don't know what to call it) spreadsheet. There are no cells to enter anything in. I do get the "File, Edit, View, and so on" at the top. I can click on File than Open and browes for the file and open it that way, but I can't open any Excel file by double clicking it in explorer.

View 10 Replies View Related

Hyperlink Pictures Opening In Ie7

Feb 24, 2008

since my pc has updated to ie7 all pictures that I open via hyperlinks from excel now open in and internet explorer window instead of windows picture & fax viewer as JPEG's are set to.

If I open the JPEG files directly they open with the correct program.

I'm sure it must be a setting somewhere but I cant find it.

View 14 Replies View Related

Message Box Upon Opening Worksheet

Nov 17, 2009

get a message box pop up upon opening of workbook no matter that tab its saved at.

View 3 Replies View Related

Generate Vba For Opening Stock?

Apr 10, 2014

PFA my inventory managment sheet. In transections sheet i am entering my stock in and out details. I want to generate monthly statement for particular item. I am able to get issue and receipts but not able to get opening stock on the particular day.

View 3 Replies View Related







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