Macro Not Working For Other Workbooks

Jan 28, 2014

Below is a code which I added to my 'Quick access toolbar' (and which is based off a hidden workbook). I use this macro to fulfill tasks to regular excel spreadsheets that are not macro enabled, however, I can't seem to get this macro to work for other workbooks. How to modify my code to work for other spreadsheets.

[Code] .....

View 4 Replies


ADVERTISEMENT

Working With Two Workbooks Through USERFORM?

Jul 29, 2014

i have 2 workBooks (firstWB & secondWB)

In fristWB i have UserForm in which their is
TextBox_1 & Transfer_btn-->cmdbutton
..with transfer_btn i want anything written in TextBox_1 should always paste new row in secondWB workbook
I am trying to do this with USERFORM

i am also trying to do DYNAMIC CHART in USER FORM

View 10 Replies View Related

Working With Closed Workbooks

Dec 2, 2006

i can use application.username to get activeuser name and have excel check this and close the workbook if its not me, what i want to do is have excel check lets say cell A1 in workbook SECURITY.xls stored in C: and if it says Craig Shippey leave workbook open if not close the workbook, why i said working with closed workbooks is i dont want to have any indication on where its checking from,

1. i have a workbook in which i want an Workbook_open macro lets call this workbook staff.xls
2. the staff.xls should read cell A1 from C:security.xls into a variable called Check
3 if check craig shippey close workbook without any prompt

all this should be done without anyone knowing that a macro opens another workbook, i know if the user disables macros then it will still open, but i will just set their Macro Security level to low so they wont be prompted, i will also remove that item from their menu bar, if they cant see it they wont be able to alter it back

View 9 Replies View Related

Vba Copy Paste Between Workbooks Not Working

Jun 2, 2008

Why isn't my copy and paste working between workbooks? We use excel 2000. I've resorted to using a lot of selection because I can't seem to figure out what is going on otherwise...

I'm sure this should be much simpler...


Sub PortData()
Dim wbA As Workbook, wbB As Workbook
Dim ws1 As Worksheet, ws2 As Worksheet, ws3 As Worksheet, ws4 As Worksheet, ws5 As Worksheet, ws6 As Worksheet
Dim sPath As String, sName As String, bTextSwitch As Boolean
Dim nLast As Long
Dim i As Long

View 9 Replies View Related

Form Not Working If Other Workbooks Are Open

Mar 24, 2009

I've been developing a form in excel (not userforms, just the usual conditional formatting, validation and macros to show/hide rows etc). It all works fine now except one thing was noticed when a colleague was testing it. If she opens the form from the email, and she already has excel open, then the form will not work when she makes a selection from the dropdown list, which unhides the rest of the form. If she closes down all of excel and opens the form from fresh, it works fine.

View 9 Replies View Related

Working With Muliple Workbooks/xls Files

Jun 20, 2007

in simple terms im trying to cross reference a name list with registers from another wrokbook. so basically the desired result is. i press my button and it loads the second workbook up, it then uses the a name list in the new book and searches for that names maches in the registers (a group of sheets) on the previous workbook then if a match is found it colours the background in green. I am however getting errors e.g. "run time error: '424': Object required"

with this line then highlighted in yellow:
u = ShtNm.Sheets("Sheet1").Cells(1, "C").Value

Sub Macro1()
Dim u As Integer
Workbooks.Open FileName:= _
"S:HR TrainingO2 Operational TrainingRetentions and CollectionsUpgrades
ames 18th june onwards.xls"
ShtNm = ActiveWorkbook.Name...............

View 3 Replies View Related

Running Stopwatch In Background While Working On Other Workbooks

Apr 14, 2014

I am trying to create a timekeeping workbook that will track the time I spend on certain tasks. I have created the attached worksheet including macros that correctly allows me switch between tasks but I cannot run this set of macros in one workbook and work in another.

AtTask Timer.xlsm

View 1 Replies View Related

Multiple Instances Of Excel When Working With Two Workbooks

Jan 31, 2012

Windows 7 . How do i open multiple instances of excel? even when im working with two workbooks rather than both appearing as the active book in excel only one can be on top. id ideally like to have both appear side by side on my desktop, vertically not horizontally.

View 1 Replies View Related

Stop Working Out File Paths For Referenced Workbooks....?

Apr 29, 2009

I'm working on a sheet which references a sheet in another workbook. I want to refer to the other workbook simply by it's filename (Forecast.xls) but whenever I save and reopen Excel has replaced the filename with the full path (C:Documents and SettingskoconnorMy DocumentsAuto-sheet project[Forecast.xls])

This is quite inconvinient as I am eventually going to want to move both workbooks together to a different location. Is there a way to make Excel stop working out full file paths and just look for the filename in whichever folder the active sheet is sitting in?

View 3 Replies View Related

Macro That Takes Workbooks Or Files And Runs Them Through Another Macro

Apr 25, 2007

i need to make a macro that takes workbooks or files and
runs them through another macro. i already have the 2nd macro
done and it is working perfectly i just need to know how to make the one
that finds the other files and runs them all through the macro i already made. My boss said that he will have about 150-200 files to run through this macro.

View 9 Replies View Related

Macro Not Working On Other Spreadsheet

Feb 7, 2014

The attached workbook contains a macro ("Transfer_Data") that copies values from one cell to another when the "Update Progress" button (near cell A3) is selected. It works perfectly fine in this workbook but when I try the same code in another workbook, which looks and operates exactly like this one, nothing happens.

Is this due to a security setting or missing code line items?

copy&paste in next blank cell2.xlsm

View 10 Replies View Related

Unprotect Macro Not Working

Feb 2, 2014

It gives me a error and says my password is wrong. I have user names set to return the password so that it is unlocked for certain people. It works for unprotecting the sheets. I modified it and added it back in to try to do it for the workbook.

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

I realize that they " and () around the password are differant, but that's how I last left them. I have tried several combinations and it just gives me more errors saying expected end of statement, etc.

View 8 Replies View Related

FIND Not Working In Macro

Sep 2, 2008

I am using this code in a macro to find a substring from a string in cell G1.

View 11 Replies View Related

One Macro Stops Another From Working

Dec 2, 2011

I have this macro which sits in the workbook module:

Code:
Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Excel.Range)
Static OldRng As Range

On Error Resume Next
If Application.CutCopyMode = xlCopy Or Application.CutCopyMode = xlCut Then
OldRng.EntireColumn.FormatConditions(1).Delete
OldRng.EntireRow.FormatConditions(1).Delete

[Code] .......

It's used to highlight the selected/active row.

But, as soon as I run another macro, it simply stops working entirely and I'm left with a row permanently highlighted until you manually remove the conditional formatting. All formats and cell colours controlled in the other macro stop working as well. This is the other (edited for publishing) macro, which is used to send an email, and is found in a module:

Code:
Sub Send_Mail()
'this sends an email that sends a text message

Dim OutApp As Object
Dim OutMail As Object
Dim MyButton As String
Dim strTo As String

[Code] .......

I didn't write the first macro so I'm not sure where the problem is? I'm guessing there is something in the code that is stopping it from working (i.e. running conditional formats) as soon as another macro is run? Is that was is happening?

View 5 Replies View Related

Subtotal Not Working In Macro

Jan 15, 2009

I've got a semi-recorded macro to format a report I run, and towards the end it deals with sorting, subtotalling, formatting text etc. The main function of the macro is to split a large report into several smaller reports defined by whichever manager name appears in the relevant column. The smaller reports need subtotalling by 2 different columns so I have the following macro code :


Cells.Select
Selection.Subtotal GroupBy:=2, Function:=xlSum, TotalList:=Array(5), _
Replace:=False, PageBreaks:=False, SummaryBelowData:=True
Selection.Subtotal GroupBy:=1, Function:=xlSum, TotalList:=Array(5), _
Replace:=False, PageBreaks:=False, SummaryBelowData:=True

For some reason this only subtotals by the second column and not the first. I tried swapping them over so GroupBy1 then GroupBy2 but it's still the same. Anyone got any ideas why this might be? I appreciate it's not the smoothest code I could use but I don't know enough about code to do any better.

View 9 Replies View Related

Macro Recorder Not Working On Other PC

Jul 7, 2009

Have recorded a Macro which is doing a great job, but when i try to run the same macro from other pc its not running,pops an search error.

View 9 Replies View Related

Ctrl+down Not Working In Macro

Jul 22, 2009

I've got a column that auto-populates from anther column depending on what's input, and that's working fine. I also have a button set up to select and copy the auto-populated data. I just recorded myself select the top cell and hit shift+ctrl+down to select just the values that are populated. What it does, however, is selects the blank ones too. I know the counta() function would work, but I don't know how to input that into a macro.

The macro I have now is:

Sub Copy()
Range("B2").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
End Sub

The column is only 25 rows tall.

View 9 Replies View Related

Save As Macro Not Working

Feb 17, 2010

I have a macro to export two worksheets and save as, but the save as part will not work, it just exports to Book1.

Ive checked the directory and everything is fine.

I want the value of a cell in one of the exported worksheet to be included in the save as name.

I'm just wondering if the code needs to somehow specify the worksheet to get the cell value from or will it default to the first worksheet. but either way my code is still not working and i can't tell why.

Should i just create a seperate macro for the save as?

Here is the ...

View 9 Replies View Related

Macro Available To All Workbooks

Nov 30, 2007

I would like to create a module for spreadsheet and I want it to be included in all excel files, i.e. whenever you open any excel file that vba module should be included

View 4 Replies View Related

IF Function Not Working For Entire Row While On Macro

May 10, 2014

I got a problem with a macro i'm working on. I got column D which contains text as "Figures", "Toys", "3DS", "PS3" etc. I also got column N where i need the macro to display "Toys" if it's a toy, figure, etc; or "Games" if it's "PS3", "PS4" etc.

I'm using the following code, to also select only blank rows (so to ignore row 1 which is table header). Problem is that the result shows only "Games".

VB:
Columns("N:N").Select
Selection.SpecialCells(xlCellTypeBlanks).Select
Selection.FormulaR1C1 = "=IF(RC[-9]=""*toys*"",""Toys"",""Games"")"

View 4 Replies View Related

Macro That Should Hide Rows Not Working Well?

Apr 17, 2014

I'm having a problem with my macro .However, if i use the following script:

[Code]......

If i am correct all the rows with a value less than 1 should be hidden right? However, some rows are hidden when they shouldn't be.

Im working on a quotation with different products in it. And the rows with a 0 in it should be hidden and that's pretty much working. But it also hides some of the subtotals(which i dont want) and some stay unhidden.

View 6 Replies View Related

Macro For Creating Months - Not Working

May 20, 2014

I have macro for creating months. Code worked fine, but now I use merged cells in range where days should be created, and code no longer works (Error : "Cannot change part of merged cells").

Tried with unmerging cells, but then code inserts days in shorter range that I need, so code needs to be changed.

[Code] .....

Attached File : Macro_months.xls‎

View 14 Replies View Related

Taking Over Spreadsheet With Macro Not Working?

Jun 3, 2014

Debug error points to:

BuildPlan(Worksheets(SourceWorksheet).Cells(j, "A"), Worksheets(SourceWorksheet).Cells(j, "E"),
Worksheets(SourceWorksheet).Cells(j, "F")) = Worksheets(SourceWorksheet).Cells(j, "K")

Sub is below:

Sub UpdateMonthForecast()
Dim Month As Integer
Dim Year As Integer

[Code]....

View 2 Replies View Related

Saving As Stops Macro Working

Feb 6, 2008

i have a worksheet named for example 'allocation 1' this is a master document and is opened and modified and 'saved as' under a customer name. This then stops a few important macros working properly because they refer to the original title and not the new saved title. Is there any code that will let the macro recognise any new title it is saved under?

View 10 Replies View Related

Workbook_SheetChange Evet Macro Not Working

Mar 5, 2008

I found the following code elsewhere on the net, and have attempted to use it in my workbook to change the names of all 31 worksheets when a certain cell's (C7) value changes. The code looks good to me, so I cannot understand why it is not working. I am not getting error messages, just no changes to the sheet names.

I believe this may be due to the value of C7 on each sheet being dictated by a formula, so the value is not being changed with the sheet active, but indirectly with a formula that pulls the value from a cell on another sheet, and then adds.

(i.e. =TEXT('Populator Tools'!$C$25+1,"mm-dd-yy") )

Am I completely off base with this assumption, or on the right track; and if I am on the right track how do I fix this so it works?

Code Below.

The Workbook_SheetChange Code Stored in This Workbook Module

View 9 Replies View Related

VBA Macro Not Working When Workbook Is Protected

Apr 23, 2008

I wish I could have been more specific with my Title. This is what I am encountering. I used the McGimpsey code for generating a unique sequential number every time a workbook opens. I tailored the code to fit my needs and stuck it into my invoice sheet. For the longest time I was unable to make it work until I moved the code from a template to a standard workbook. Then I was able to make it work as long as the sheet was unprotected. I realized that to get the code to work I had to then unprotect the cells that the code was writing to. Now that I've done that I am getting errors in the code that weren't there before, rendering the macro useless. The code I am using is:

View 14 Replies View Related

Macro In 2003 Is Not Working In 2000

Apr 25, 2008

I have constructed a macro, (with lots of help from the fine people on this site), and have distributed it to several people in the company. The macro was written in Excel 2003, and runs perfectly on all the machines running Excel 2003, but persons using Excel 2000 are getting a runtime error, variable not defined.

Is there a trick to getting a macro to run in both versions of Excel?

View 9 Replies View Related

Macro To Return To Where User Was Working

May 29, 2008

i have an excel doc. with three sheets...
i may start that macro on any sheet any cell
the 1st thing that macro does is to go to sheet1 and after running the whole code it calls another macro... macro2

now macro2 runs in an infinte loop and runs evry 20 sec. the problem is every 20 sec the cursor comes back to sheet3.. i want the macro to return to the place where the user was working.. best wud be that the user can work seem lessly...

View 9 Replies View Related

Adding Cell = Macro Not Working

Dec 9, 2008

I had a working macro before i added an extra row for another entry (No. of Hours spent). The entire data collection calculates the total price of a project (called PSR) in another cell underneath. The macro is suppose to move the entire data into another sheet to keep a history (in Sheet2). I've attached the file containing the workbook.

View 2 Replies View Related

Formula To Cell With Macro Not Working

Jan 26, 2009

Formula to cell with macro not working
I'm trying to enter this formula into cell in VBA macro.

View 3 Replies View Related







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