Moved Workbooks To Folders Now User Form Subsript Out Of Range

May 19, 2008

The attached workbook has a userform which was searching the same folder where this file is located for entries in columns "A" and "B" of files named in column "I" (workbook1, workbook2 etc).

I have this placed on a sharepoint and want to move the files into specific folders (folder1/workbook1, folder2/workbook2 etc.) so I can set them as view only folders to stop unuathorised editing.

I am now getting a "Subscript out of range" error after doing a search. I can see it's a problem with the file name as it's pulling it from text in a cell but can't work out!

View 9 Replies


ADVERTISEMENT

How To Protect Shapes From Being Inadvertently Moved By User

Feb 5, 2014

I did create a group of two shapes. One square and one circle. The main reason behind grouping them is to have them rotate around the same centre.

Now the problem of the usage of the shapes. I don't want them inadvertently shifted by the user. The rotation of the circle will be wobbly.

The circle is rotated by a module. Protecting the sheet makes the rotation of the circle stop working.

My thought was to overlay part of the sheet by an Active X label and set the BackStyle to transparent and there is no need to protect the whole sheet.

The problem now is that when I click on the label it turns white, and as soon as I move the cursor out of its perimeter the "underlying" circle will become visible again.

How to prevent this behaviour of the label. I want the label to stay invisible and protect the underlying shapes from being moved.

View 2 Replies View Related

How To Make The Macros Keep Working Even If The Sheet Is Moved Or Mailed To Another User

May 26, 2009

I have created a workbook ( with protected sheets) containing two macros " To Insert a Row ( Copying the formula from the row above) and "Delete a Row", both, assigned to a customized toolbar.

when I move the workbook, say from the folder where I created it originally to the desktop, the macros stop working giving error like THE MACRO " C:so n so... CAN NOT BE FOUND!

View 9 Replies View Related

Search Folders And Sub Folders For Worksheet And Return Range?

Jul 8, 2013

macro and I think this has me on my way; however, I do not understand the code and I am having difficulty modifying it. It returns the path in cell $A1 of my workbook, but I get reference errors in $B1:$L1.

I would like for the code to start entering the values in row 2 of my current worksheet. Row 1 I want to make a header row. The first column I like having the file path. Can the path be changed to a hyperlink? I would then like for it to return the values in $AP1:$BC1 to $B1:$O1 of my current workbook.

View 4 Replies View Related

User Form, How To Save And Add Data To Range

Jul 15, 2009

I have a user form designed and now I would like to be able to program a Command Button to "SAVE" and when it is clicked, I would like to save the results of my fields to another worksheet. I have a defined range that I would like to have the inserted row into?

View 2 Replies View Related

FileListbox In The Form :: How To Display Folders?

Jan 4, 2008

I have inserted a FileListbox in the form.

it displays all files but not folders how can i display folders?

secondly i want to select and open the selected file.

View 9 Replies View Related

Open Workbooks In Two Folders

Jun 24, 2009

I have a script below that opens all the workbooks in a folder based on a msgbox. The script works as is. However what I would like to do is remove the msgbox and have the script go back and forth between the folders.

Example it would open one workbook in the (Large Area)folder call my other script (Hazleton_Data_Conversion) Return Open a workbook in (Varsity) Folder Call the
my (Hazleton_Data_Conversion)and repeat the process till all the workbooks in both folders have been processed.

Like I said this script works with the msgbox I just like to change to without msgbox and to flip back and forth.

View 3 Replies View Related

Code To Pull Data From Workbooks Across Various Folders

May 3, 2007

I've seen a lot of code on how to pull data from workbooks in the same folder. However, I'm trying to pull the data in workbooks in various folders.

For examply, I have one folder, called "Master Files". In this folder is 12 folders, one for every month of the year. Within these folders, is one for each week, with the last day of the week being the name for the folder. In other words, it's like \Master FilesApril4-6-07data.xls

Now, I know how to get the data I need if all files are within the same folder. But how would I write a macro to run through all of those files when they're in separate folders?

View 9 Replies View Related

Consolidate Data From Multiple Workbooks From Different Folders/directory

Feb 5, 2010

I was searching through the internet to look for some help with regards to consolidating data from multiple workbooks from different directories into a single worksheet called Summary.

I would like to copy the entire worksheet from different workbooks in different directories into this workbook I like to call Summary. To manually do it I have to open the workbook I want to copy the worksheet from. Right click on the tab and select Move or Copy, select the sheet I want to copy and select the workbook I want to copy this sheet to. Repeat this process for all the workbooks.

The next step is to copy and paste from these sheets into a main summary sheet. The data range from these sheets are starting from row 13 onwards and they may be of different size between Column A to Column W.

For example the workbooks are coming from :

S:Area 1West.xls from worksheet Andy
S:Area 1East.xls from worksheet Bill
S:Area 1North.xls from worksheet John
S:Area 1North.xls from worksheet Albert etc...

View 9 Replies View Related

User Form-Easy Selection Of Data To Be Filled In The Form

Jun 3, 2006

find the attached workbook

I have a Database and user form, in the user form i have a field named “Vehicle No” this is a combo box from which a user needs to select the Vehicle numbers, and all these are working fine now, I need your help in the following:

When user selects the second field named "Select Vendor name" i need a pop up window which shows all the Vehicles belongs to the vendor which they have selected, and with the popup window user selects the vehicle number then the Vehicle number combo box should be filled.

Currently users have to select by scrolling through Combo box which takes long time and difficult to find by scrolling.

View 7 Replies View Related

Macro- Code To Transfer Data From Multiple Workbooks Within Folders

Sep 15, 2008

I have been given the following code to transfer data from multiple workbooks within folders and subfolders to retreive the same line of data from each of the workbooks and place them in a master workbook.

the folders are set up as follows,

there is a main folder, (a yearly folder)
within this are 12 monthly folders (named January to December)
within these are four weekly folders (named week 1 -week 4)
contained within these weekly folders are the workbooks that i wish to copy data from.

for example a1 - k1

the code i am using transfers the file names but comes up with #REF! instead of transfering the data

Here is the

View 9 Replies View Related

Prevent The User From Saving The Data Input From The User Form If Any Of Those Three Fields Is Left Blank

Feb 9, 2010

I have a user form that has a combo box "City" two text boxes one called "Flight" and the other "Date". What I'm trying to do is to prevent the user from saving the data input from the user form if any of those three fields is left blank. The code that I have so far checks all of the required fields, if any are left blank a message notifys which field(s) is left blank and return the focus back to that field. But the rest of code also fires.

What I really need is either to stop the code if any fields are blank and return the focus back to the blank field, the user completes the field(s) and clicks the save again, or better yet, pause the code until all the required fields are completed and then complete the save. (There is actually another 200+ lines of code in this sub, but I deleted it to keep the post a little shorter.)

View 2 Replies View Related

Look Up Data And Plug Into Form - User Form In Reverse?

Jan 14, 2009

I have created a registration workbook for this year's youth sports league. All of the information is entered into a User Form and separated onto it's appropriate sheet designated by the child's age. Next year, I would like to use this year's workbook to look up returning players.

Will it be possible to add a "lookup" button into my form, or create a lookup program, that once the registrar clicks on the correct player, the information is plugged into the User Form, the registrar adjusts the age and any necessary info, presses enter, and the information is copied into the appropriate category in the new workbook? I haven't worked with User Forms long enough to know if they can be filled in that way, but if this can be done, you are the people who would know.

View 3 Replies View Related

Unload Or Hide User Form On Show Next Form

Dec 2, 2008

I'm using a series of user forms for data entry to a workbook, some of them open next stage user form on completion (OK cmd button).

All that is working fine, but I'd like the initial form to close on showing the next one. I've tried adding Unload and Hide commands following the frmInsertEntry.Show (Next stage form), to no avail, but I'd like this user form to close or hide at the end of the sub.

Private Sub cmdContinueType_Click()

ActiveWorkbook.Sheets("Records").Activate 'Select starting cell in record sheet
Range("N3").Select

Do
If IsEmpty(ActiveCell) = False Then ' Search for next empty cell
ActiveCell.Offset(1, 0).Select
End If
Loop Until IsEmpty(ActiveCell) = True

If optDrillType = True Then
frmDrillEntry.Show
Else
frmInsertEntry.Show
End If

End Sub

View 9 Replies View Related

Use Excel VBA To Copy Multiple Files From Different Source Folders To Different Folders?

Jun 12, 2014

I need to back up files, which may be excel or MSword, by copying them from different directories, say C: to the backup directory, say X:. any vba to backup the files? I expect the vba can copy all file listed in column A.

E.g. C: est1File1.xls or C: est2File2.doc, and then pasted to the directory in column B. e.g. X:BackupFolder1 or X:BackupFolder2.

View 1 Replies View Related

Arrange Or Group Folders Based On Assigned Icons To Folders Using VBA

Dec 20, 2011

I have folders with different assigned folder icons based on the content in the folders.

I would like to arrange these folders in the window based on the assigned folder icons and then by alphabetical order.

How it is to be done. Can we make use of vba having the folders path list in one column of excel sheet?

View 9 Replies View Related

Making Macro That Will Create New Folders And Then Save In Those Folders?

May 21, 2014

I am attempting to create a macro that will create a new folder on the network drive Arie:quotes that will create the new folder and save the the file in the new folder. I need the name of the file and folder to be set to the master (worksheet) cell "B3". and then if possible have it be conditional that if cell "B40" on the same master (worksheet) has a value to have the value added at the end of the filename via hyphen. This workbook has numerous worksheets in it approx 15 worksheets. I am not sure if this is relevant.

As an brief example.

Cell "B3" on the master(worksheet) contains a job name I-40 bridge
So initially I would like the Folder name and file name to be I-40 Bridge

However once the Cell "B40" has been filled in with the value 54213 then I would like the file to renamed to I-40 Bridge-54213 and saved within the same folder.

I am currently working with Excel 2007 Pro edition on windows 8. I

I have found several other macro's that work with an auto save but i am unsure of how to change the directory to the network drive and show the correct file paths. This is the example of the macro I am currently working with.

Public Sub SaveAsA1()
ThisFile = Range("B3").ValueMkDir "C:NewFolder"ChDir "C:NewFolder"ActiveWorkbook.SaveAs Filename:=ThisFileEnd Sub

View 4 Replies View Related

Consolidate Data From Multiple Files Within Folders & Sub Folders

Aug 16, 2009

I have managed to get this far - I have put together a macro (from different threads on this site) that opens closed workbooks, copies data in one of the sheets (same sheet in each of 28 books), and pastes the data it into a master book sheet, each paste starting below the last. So that bit is working. The first bit of help I need is a line of code that will make the macro loop through a number of sub folders in a main folder. My code at the moment works as long as I specify a path that ends with the name of one subfolder, and it only loops through this subfolder. I would like the path to end at the folder that holds all the subfolders ('Workbooks' in the path below), and then add some code that tells it to apply the macro to all subfolders in this folder, so it loops through them all.

The second issue is that after the macro goes to the closed book(s), copies the data in there and pastes it into the master sheet (into columns E:FG), I then need it to go back to the workbook it just copied from, go the same sheet, to three specific cells on that sheet (FH1:FH3), copy the content, go back to the master sheet, and now repeatedly paste the content (values only and transposed) of these three cells into three cells (in columns B:D, with row number being dependent on what rows the first lot of data was copied into) next to every row it just previously pasted in for me. When it loops to the next workbook, it needs to do the same, and the three cells will have different content than the ones in the previous workbook paste.

I dont know how to define the range it needs to paste into the second time. I tried using the definition I used for the first paste (MCDrow), to tell it that it is the same rows, just different columns, but this is not working.

Here is what I have so far, which does the first part of what I need, except for needing a way to have it loop through all subfolder in the 'Workbooks' folder (at the moment it lists Barwon South West as a subfolder in that path, but I actually have multiple subfolders, not all called Barwon South (all different names) that it needs to loop through and do both the first and the second paste for. I have taken out the code I was trying to use to do the second paste, as this was not working and the code is pretty messy as it is (I sort of bumble along, being so new, and I know the code is not very clean or efficient!).

Can someone help me put in the few lines I need to loop through all my subfolders (if you give me an example I can probably extrapolate), but to get you started, three of the subfolders are Barwon South West, Eastern Region and Gippsland. And can someone help me put in the code that will do the second paste for each workbook?

Sub Click2()

Application. ScreenUpdating = True
Dim MCDrow As Long
'Dim SubFolders As String
MCDrow = ThisWorkbook.Sheets("Client Data").Range("A65536").End(xlUp).Row

Fpath = "Q:Clinical ServicesCS Statewide DatabaseWorkbooksBarwon South West" ' change to your directory
'SubFolders = True
Fname = Dir(Fpath & "*.xls")
Do While Fname <> ""

ThisWorkbook.Sheets("Client Data").Unprotect

Workbooks.Open Fpath & Fname
Worksheets("Client Data").Activate
Worksheets("Client Data").Unprotect

View 6 Replies View Related

User Forms- Create A User Form That Will "pop Up"

Oct 25, 2007

I have a spreadsheet with the following headings:

A
Claims Number

B
Name

C
Scheme

D
Admin

E
Date

I need to create a user form that will "pop up" and ask the administrator to enter the above details.

A - should be created automatically (ie last claim number + 1)
B - user enters manually
C - data retrieved from a list
D - data retrieved from a list
E - date is the date the information is entered

View 9 Replies View Related

User Form

Feb 24, 2009

I have a user form that I want to take the information and have it input on the worksheet. I want it to start at A3 and check to see if that cell is "" and if it is not then enter the data from the from horizontally. If A3 is not "" then continue down column A untill the first nonblank cell is and then select that cell and have the data entered horizontally.

I have this code so far but it is not working.

Private Sub cmdSubmit_Click()
Dim Month As Variant

Month = Me.cmbMonth.Value

ActiveWorkbook.Sheets(Month).Activate

I have done a bit of excel programming last year but have not done any for the last 4 months so I am a bit rusty.

View 9 Replies View Related

Combobox In A User Form

Aug 30, 2007

I've written a workbook that enables my workmates to enter sample information easily (workbook attached). What i need help on i cant get the combobox 's on the user form to pick up the related info in worksheet named "data" and insert it into the relavant coloumn in tab named "Results". I can get it to work without using combobox's and just typing the info into a textbox but i wanted to use combobox's.

Another thing i wanted to do was pick invidual results and send them the "Report" for printing. how would i do that.

View 14 Replies View Related

User Form Drop Down Box

May 25, 2008

I have a project, i want to create a user form, basically i have a work book that contains dinner menu's on column A and ingredients in column b.
I would like to create a user form that have a drop down box that would show all the possible menu's referencing my workbook sheet1 column A values. and by selecting a item, i would like to be able to show all ingredients needed, is there a way to do this?.
I hope so, it would be so cool to do this.

View 11 Replies View Related

User Form Interaction

Jun 22, 2009

I have created a multi utility user form that user can initialize by a shortcut key. The problem if user want to see the content on sheet or want to change the active cell, he has to close the form and then do any action. This form is initialized by a command and default included in excel as a Add-in. Is there is any way to make the form floating i.e. user can manipulate the data and can see the form as well.

View 4 Replies View Related

Using The Scroll Bar In A User Form

Jul 8, 2009

On a userform, I have 5 paragraphs of text that the user needs to read. The problem is the user can't see all 5 paragraphs, the user is only able to see about two paragraphs. I don't want to make the userform larger but I would like to add some type of scroll bar that would allow the user to scroll up and down to view all of the text.

View 7 Replies View Related

Comments In User Form ...

Dec 20, 2009

Can anybody help me with a code that shows a comment within the user form when specific a checkbox is selected?

I am attaching a sample file with user form containing 6 checkboxes. I need when Name6 is selected, a comment "Test" to appear inside the user form beside the checkbox.

View 6 Replies View Related

Placing User Form

Apr 6, 2007

I have created a user form (thanks Datsmart), and now need to place the data that will be inserted in that userfom onto my spreadsheet.

The spreadsheet will have 50 rows, each containing a different project. There will be a button on each row to activate the user form for that specific row. They click the button on the spreadsheet, and the user form opens. They enter the data on the user form, and once they click the "add comment" button on the user form, the data should be entered in the last cell of the row on which the button is located.

Now the complicated part:

The users will use that for to update the project from week to week, but each week's comment needs to go in the same cell, but above the previous comment.

IE:

Week 1

Jan 1: Project lauched

Week 2

Jan 6: Project budget submitted
Jan 1: Project lauched

Week 3

Jan 22: Budget approved
Jan 6: Project budget submitted
Jan 1: Project lauched

The date being the date from the user form, and the comment being the comment from the user form. If the latest date can be bolded that would be a bonus.

They each have to go in the same cell cause all relate to the same project. This same thing will be repeated 50 times for each different project.

View 9 Replies View Related

User Form Printing

May 24, 2007

I came here yesterday asking for help and was helped immediatly, but I have another question/problem. I got my user form up and running, however I've just been informed that the form has to be able to be printed out. So basically I need this user form with all the data on it and I need it to be printed.

Is there a way to add a command button perhaps that prints out the form with the data on it? (Ex: Imput Data, hit Print command button, have an electronic and hard copy of the information)

View 9 Replies View Related

Mask In User Form

Oct 16, 2007

I have a user form with 2 textboxes (used as parameters for an ODBC query). The entry should be a period, as yyyymm. How can I check, for instance when clicking the Ok button after entry, that both textboxes are of the "000000" format and the last 2 numbers are between 01 and 12?

View 9 Replies View Related

Counter For User Form

May 10, 2009

I have the following code in a user form....

Private Sub cbSearch_Click()
Dim Product As Range
Set Product = Sheets("Master").Range("A1:A300").Find(Val(tbLookFor), lookat:=xlWhole, LookIn:=xlValues)
If Product Is Nothing Then
MsgBox "Incorrect Product code, try again"
Else
'Populate the userform with data
Dim counter
counter = (0) + 1
Label35 = counter
tbData1 = Product.Offset(0, 1) 'Down 1 row, over 1 column
tbData2 = Product.Offset(0, 2)
tbData3 = Product.Offset(0, 3)
tbData4 = Product.Offset(0, 4)
etc, etc, etc
I need the counter to increase every time a search is performed, at the moment it only does one count, no matter how many searches are performed.

What do I need to add to the counter part of the code for it to increase by 1 every time?

View 9 Replies View Related

Out Of Memory - Is My User Form Too Big

Jun 3, 2009

I have recently just encountered a problem where whenever I try and run / edit any part of my user-form code i get the following error:

Compile Error:

Out of memory

The help document then lists about 12 things that could cause this.

My user form code is very small, however the form itself is large, it has a multipage with 12 tabs, each tab then contains between 50 and 100 labels which populate with data from the spreadsheet in the background.

Do you think this size could be causing the error? If not, does anyone have any solutions / ideas?

My hardware / software setup is all ok.

View 9 Replies View Related







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