I am in need of duplicating a current workbook for others use such that when I update information in the original all those who have a copy of the duplicate will get the updates I have made. I have searched all over for linking workbooks together and I am familiar with linking cells and other small bits of information from other workbooks but in this case I want a duplicate workbook that is updateable from my source workbook.
I have a worksheet (Morning Reports) that has a running macro on what I need is how do I get this same code to work on a different sheet titled (Afternoon Reports) This afternoon report will be a scaled down version with slightly different range:
How do I modify this code to do the same thing just on a different sheet
[Code] ....
Protection password is "Financial3" and sheet and VBA
Attached File : New Morning Report - Master_Copy-NO DELETE.xlsm
How to open a fresh workbook and have information automatically being pasted in, based on a checkbox trigger. I don't know if I have explained well or not but essentially it is this:
W5 is the checkbox with a tick and a cross. When the cell is ticked I want to specicy cells on this record to be brought over to another tab.
I have an open workbook (A) and this is where the code should reside. I want to use VBA to copy the content of an entire worksheet from a closed workbook (B) to an existing worksheet in workbook A. How would you accomplish this?
I have 2 workbooks. 1 is where data is entered called wksPB, the other is like a database workbook. The wksPB has data to be feed from column B to F and there is a dropdown.
what im looking to do is, if the combobox value is selected as Decline then it should display a messagebox that reference value in cell B is denied. if combobox value is Agreed then the macro should search the database workbook for the text entered in column b of wksPB and then copy data of C:E of wksPB to H:J of database sheet where that text is found and also the approver name in wksPB C24 to the approver cell of where that text was found. I've reached till finding the text but what I get my head twiting on is how to copy the text from wksPB column B:F to database sheet column H:K. Im attaching the sample workbooks and the code where ive reached till.
[Code] .....
Attached Files Replacement Records - 2014.xlsx forum file.xlsm
I am using the below code (i have combined different bits of code which i found on these forums) to open a new workbook, copy all the data in it and paste it into Sheet2 in the active workbook . Also, i want the data to be pasted on the next empty row as there is already data in Sheet2. The data that is being copied and pasted has the same format and it is going to be repeated many times.
The problem i am having is that it is not offsetting the data to the next empty row - i think it is a simple change but i can't seem to get there :s
Also, the code is currently selecting all of the data from the workbook that i open - is there a way i can select all of the data, excluding the first row (the first row contains the headings which i already have in Sheet2 in the active workbook).
I'll soon have an ETL process that will load about 150K rows into an Excel workbook. On of the columns will be the end user's userid.
I need to autofilter that external workbook based on the end user's userid, copy that range, clear a worksheet on the current workbook, and copy that range to the current worksheet.
For example, see the attached workbooks. I need to replace the data in Source.xlsb!Cases with the data in Output.xlsb!Case_List, filtered on my userid, which we'll call foo.
I have a Macro that opens a closed file to VLookup some info and pull it to my spreadsheet then close that workbook. the problem I have run into is writing the Macro correctly so if I were to change the file name of the workbook I am running the macro with that it will still use the range declared for the workbook. I have colored the file path that I want to dim in Blue so that it will be easier to see what im trying to do. here is my current macro that works perfectly unless I save my current workbook under a different file name...
I have the following code linked to a drop down list in my workbook.
[Code].....
It populates textboxes on the sheet with a lookup value result, the lookup value is taken from the dropdown box. The problem I have is any other excel workbooks that are open at the same time, the code is trying to run against those workbooks when I edit them, I can't seem to restrict the code to run only against the workbook in which the dropdown box which the code is linked to, exists in. I have tried moving the code to a module in the workbook but then the code does not seem to work as it does know which workbook the combo box and text boxes which should be filled with the lookuip result belong in
I'm trying to import data in to an existing workbook. When i run the macro in the existing workbook, a new workbook opens and the data is dropped there. What do i need to change to get the data to pull back in to the existing workbook?
I may however change the name of Book1, therefore rendering the hyperlink formula useless. Is there a way to enter something in place of Book1 that will return the current name of the workbook?
If there isn't, I will have to create a VBA program to update the hyperlinks, and will therefore have additional questions about that shortly.
I have developed a macro, run by a button click, in my workbook.
I have about 5 other workbooks to process, what I want to do is to have my workbook with my macro open, then either copy or import these other 5 workbooks, one at a time, into my current workbook so I can run my macro on their data. Not sure if I need to copy them in or not, but thats all I can think of. I'm not even sure how to do this manually, I tried having my workbook open and doing a file - import on the .xls file, but it seems to be translating my data and I'm ending up with a value of 'f1' in one of my columns, no idea what that is. All I really want to accomplish is to run my macro on each of the 5 workbooks, one at a time.
i am using visual basic and i'm trying to return the name of current workbook in a cell, this is what i have so far.
Public Sub bookname() Sheet8.Select Range("a1").Select Selection.Formula = "=MID(CELL("filename"), FIND("[",CELL("filename"))+1,(FIND("]",CELL("filename"))+1)-FIND("[",CELL("filename"))-2)"
show me the visual basic codes that allow me to attach the current saved workbook to an email (just attach, but not to send the file). So basically, just open the Outlook, send to, and attach the file.
I want code to: Open EstimatingSheet.xls SaveAs current workbook as Range B13 &".xls" Open EstimatingSheet.xls workbook from somewhere on C: Then close the one with B13.xls
I have a macro that starts when the workbook is open that hides many of the headers and toolbars. It is great and works fine unless you are working on another workbook and need to see those headers and tool bars. Is there a way to display and hide those items per workbook and not for the entire application. here is my failed attempt:
Sub show_excel_headers()
Dim wb As Workbook Set wb = ThisWorkbook
wb.Application. ScreenUpdating = False
'Display Headings in all worksheets Dim wsSheet As Worksheet Dim sSheetStart
Set sSheetStart = ActiveSheet
wb.Application.EnableEvents = False For Each wsSheet In Worksheets wsSheet.Activate ActiveWindow.DisplayHeadings = True
Now when I try to run the macro, it gives me an error saying: Compile Error, Wrong number of arguments or invalid property assignment. And it highlights "format" in yellow.
I have to excel files, both have the same data. I created a pivot table macro on the first file. I want to be able to open the second file and use the shortcut to create the pivot table. the problem is that it refers back to the original workbook I created the macro on. How do I change the code to make it refer to the current workbook?
On opening of an excel document is it possible to have a date in a cell that will continuously update. =now() enters the date required but if i was to go into the sheet days or whatever later is there a way that this will update automatically??
I recorded a macro to save a workbook to a specific folder using the current file name. However, I've tried to remove the absolute reference to a specific filename but it is not working for me. Am I close?
ActiveWorkbook.SaveAs Filename:= _ "H:Files and DocumentsPROJECTSSR 2 SS Phase Two Component ReliabilityWinTrac Files xt_conversionsexcel_version" & SheetName _ , FileFormat:=xlOpenXMLWorkbook, CreateBackup:=False
I'm making a dashboard and currently using a camera tool to show a sheet in a different workbook.
However the camera shot should show the sheet for the current month. (the workbook contains 12 sheets one for each month)
I was trying to reference a cell within the dashboard workbook in the formula bar to select the correct month.
[Code] .....
This is the workbook being referenced and
[Code] ....
This is what I have to try select the sheet with the right month. W2 contains whatever month it currently is.
I get that this formula is wrong because I'm referencing a sheet/cell in the dashboard workbook right after calling the tracking workbook, I just don't know how to write it correctly.
I want to create a standard macro that will copy values from a Master workbook to the current, active workbook I have open. The problem I have run into is when I record a macro it also records the name of the active workbook I'm copying data into and I would like it so when I bring up a workbook I just run the macro and it copies the values in. I'll be doing 8 different macros that each copy different values from the Master spreadsheet
Im trying to copy multiple workbooks and just save it into only one worksheet. I have 2000 diffrent workbooks with the diffrent amount of rows, The ammount of cells is the same and it dosent change.
im working on a excel 2010
This is what i got for the moment..
Sub LoopThroughDirectory() Dim MyFile As String[code].....
Is there a simple way to duplicate a number according to a given value? For example, i want the input to be 8 and the number is 1 so the output would be 11111111.