UCase Not Running - Suggestions

Mar 3, 2009

I've been given a new version of a spreadsheet. When I press the recalculate button the macro runs but errors with a

Compile Error:

Can't find project or library

at this code point


Function ConvertYesNo(YesNo As String) As Integer
ConvertYesNo = 0
If UCase(YesNo) = "YES" Or UCase(YesNo) = "Y" Then
ConvertYesNo = 1
End If
End Function

the code at this code point seems to be exactly the same as the old sheet according to vdiff. Is there something that might need turning on or off.

I can open the old sheet at the same time and this runs fine without hassle.

Unfortunately I have 150 sheets to edit and I don't want to go and paste them all in to the old sheet and use its recalclaution function so thought someone might be able to cast some joy on the matter.

Macro security is low, file is saved onto hard disk, no read only epermissions.

View 9 Replies


ADVERTISEMENT

UCASE, LEFT$ And Similar

Sep 16, 2008

I use these and related functions (Format, Right$ etc) in my VBA code. Works perfectly on my machine, butwhen a colleague opens the sheet I get repeated compile errors - "Can't find project or library". I have checked all the references and tey are all there, so much scratching of head.

View 9 Replies View Related

Ucase (all Upper Case)

Feb 24, 2009

I have a usferform where I want the result from textbox1 displayed in the cell as all caps.

here is what I tried but not effective.

If UserForm7.CheckBox5 = True Then Range("A23") = UserForm7.UCase(TextBox1.Value) & " SPECIAL EVENT RENTAL"

View 9 Replies View Related

Uppercase In Multiple Fields Using Ucase

Jun 1, 2006

i have a form that i have 2 fields that need to be capatalized at all times - B6 and G6 I have used this formula to get B6 to work but for the life of me i cant get BOTH to work and the same time.

here is the formula

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Set Target = Range("B6") 'change to your range
If Not IsEmpty(Target) Then
Target = UCase(Target.Text)
End If
End Sub

View 3 Replies View Related

Running CMD From VBA

Jul 24, 2013

I'd like to open up the command line than run not one but several lines of code.

I figured out I could do something like this:

VB : Shell "cmd /c ping 192.168.1.1"

But this is only for one command at a time, then the cmd is closed.

How could I run multiple commands without the cmd closing in between. For example doing cd Desktop, mkdir Folder. I tried separating the commands by commas and plus signs but it doesn't seem to be working.

View 1 Replies View Related

Running VBA In IE

Oct 19, 2009

I am having trouble running Excel VBA code in an excel workbook through Internet Explorer (IE).
The code I have runs fine in Excel. But when I running by opening in IE I get an error.
For example trying to run the simple command
Range("A1").Select

Results in the error message Method 'Range' of object '_Global' Failed

What do I need to change in my code to get IE to run the code properly?

Here's my
Option Explicit
Public cnn As New Connection
Public bFlag As Boolean
Dim rs As Recordset
Dim e As ADODB.Error
Dim CYExtract As Date
Dim PYExtract As Date

Public Sub LoadData()

Dim msg As String
Dim extractDate As String

On Error GoTo AnError

Application.ScreenUpdating = False..........................

View 9 Replies View Related

Running Balance

Jul 15, 2009

See attached workbook which is a stock order workbook with a summary re-order sheet -

The problem I have is that as the running balance effects the re-order column the summary re-order sheet will re-order from a the date that stock is needed onwards until someone types in stock recieved to get the balance right.

I need another condition within the summary sheet sumproduct formula so that the order will only go through once and not be repeated until a new figure is added into the number issued column on a future date.

View 10 Replies View Related

Running Ccleaner With VBA?

May 7, 2014

Is there any VBA code that will run, or better yet open, run, and then close, ccleaner?

Also, can you control whether the macro continues on while ccleaner runs or waits for it to finish?

View 1 Replies View Related

Running A SUB Inside Of Another SUB?

Jun 9, 2009

DISCUSSION:

I have some general code that needs to be kept tidy so I have been experimenting with calling other Modules to keep that general code short and sweet.

PROBLEM:

How to put the SUB's inside of another SUB on a separate Module?

Here is the desired pertinent code on the general code sheet:

View 7 Replies View Related

Inhibit Sub When Running Another Sub

Sep 14, 2009

I have an excel spreadsheet, where I am running Sub A, which checks, if users change entries. If so, in column R, the name and in column S, the date is saved. Now, I programmed Sub B, that cuts and pastes designated rows into an archive file. I would like to inhibit Sub A, because each row that is cut, means that the subsequent row switches lines, and columns R and S are updated (while no actual change occurred).

View 2 Replies View Related

Possible To Have Running Tab In Excel?

Apr 11, 2012

I have an Excel document with about 40+ tabs that represent different categories of data that I input on different days. I was just wondering if it was possible to have another tab (in the same document) that could accumulate all the data from the other tabs into one sheet so I can see all the data for each day regardless of which sheet it is on?

For example, what I input into Sheet 1 also gets written in the "accumulated" tab and the same for other sheets? And if I delete something from one of my sheets, it also gets deleted on the "accumulated" tab.

View 5 Replies View Related

Private Sub Running Twice

Oct 22, 2013

I have a drop down box selecting from a list of dates (Oct-13 - Dec-14) that I need to display as "mmm-yy" to the end user so have written the following code to format when a date is selected:

Code:
Private Sub SDatePicker_Change()
SDatePicker.Value = Format(SDatePicker.Value, "mmm-yy")
End Sub

For some reason the code seems to run through itself twice and I can't figure out why. The result of this is an incorrect date being displayed (strangely when I select 'Jan-14' for example, the result is 'Jan-13'.

Perhaps I should point out that the default formatting of the date values seems to be in number format e.g. 41976.

View 3 Replies View Related

Running A Macro

Dec 19, 2006

Can i run a macro by just the pointer going over it.

View 9 Replies View Related

Running Count

Mar 26, 2008

I'm dealing with an Excel spreadsheet. I have a list of orders on one sheet and I need to keep a running total of the amounts of the items being ordered.

Example - I have three different orders:

sheet1

1. Fried Chicken
French Fries
2. Salad
French Fries
3. Fried Chicken
Salad
French Fries

sheet2

Fried Chicken 2
French Fries 3
Salad 2

So, on sheet2 I need to somehow reference sheet1, find how many times the items "Fried Chicken", "French Fries" and "Salad" are listed and then put the total amounts next to the name on sheet2. But if I add any more of any item to the sheet1 the total will go up on sheet2.

Does that make any sense? I tried to say it as simply as I could.

I'm not really dealing with fried chicken, salad and french fries here, but that's a simple example to show you what I need.

View 9 Replies View Related

Running Roundings

Nov 14, 2008

I have a major problem that I cant get my head around what I need to do is having running roundings... eg

A - 0.1 - 0.1
B - 0.5 - 0.6
C - 0.6 - 1.2
D - 0.9 - 2.1

so in this example C and D should get "1" however A and B should not!

View 9 Replies View Related

Running Macros

Jul 28, 2006

I have a list of hyperlinks in excel with check boxes next to each, does anyone know how I can do a macro that will run another macro if the check box is checked and ignore the macro if it isnt checked???

View 3 Replies View Related

Code Changes Not Running

Nov 30, 2006

This is bizarre - over the last year or so, on two machines (one Win98SE/Off2K, the other Win2KSP4/Off2K3), very occasionally a change I've made to Excel/VBA code has been ignored (eg to add a MSGBOX call) - even after I've restarted Excel. The workaround is to add a blank line and remove it again in the actual code module, but its both annoying and intriguing,

View 4 Replies View Related

Running A Procedure

Jun 19, 2007

I have written a macro in Excel VBA. The code is divided into modules and each module is having various procedures. I'm trying to run a procedure written in modules2 from module1. I'm getting an error message "Expected Variable or Procedure, not module".

View 2 Replies View Related

Vba Running Slow

Aug 27, 2007

I have a workbook with macros Ive created that have been running just fine for 2 years now. Ive upgraded to a top of the line new Dell D830 dual core laptop with 2gb ram and installed excel 2003 (same excel as always). Certain macros that used to take a second or two to run on a celeron dell now take 3min's! Ive stepped through the code in debug mode and found that its hanging up in simple areas like "Columns("A:A").Select" and "Selection.ClearContents". We have 16 older laptops running these exact codes just fine all day long and the 2 new fast computers with core 2 duo processors are hanging up constantly in the same places in code. Ive gone through and made sure all the "option" settings are identical in excel. Is there some system setting That I'm missing or possibly an excel setting That I may have overlooked?

View 2 Replies View Related

Running Out Of Columns

Aug 9, 2008

I am building a massive model in Excel and I am running out of the columns....only 2 left out of the 256 allowed. I need a lot more columns so I am seriously considering moving to Excel 2007. I need your advice - do you think this move is adequate given that I can overcome this column limitation by continuing to build my model in the other sheets and cross- linking them? I will be using Solver or Evolver later on so I am concerned how these perform on Excel 2007. I am more concerned with the speed of excel 2007 when it comes to handling large workbooks.

View 9 Replies View Related

Ratio Running Total?

Mar 28, 2014

On the attached worksheet i have blocks of data in col C in chronological order,i wish to count the number of times related data in col AG is between 1 & 3 incl (highlighted in blue) ,the result to be expressed as a % in col V,eg block A =5,col AG has 2 event between 1 & 3,so col V = 40%.I have inserted empty rows between the data for clarity,there are no empty rows in the data.

View 1 Replies View Related

Subtract From Running Total?

Aug 24, 2014

In cell A1 i have a total amount, lets say it's 20, in B1 i have a value of 5, in C1 i have 10.

Looking to see if it's possible to take the 5 from cell B1 to make A1 = 15, then 10 from cell C1 to make it 5 in A1 whilst reducing both columns B and C to zero If B1 or C1 are greater than the value in A1, A1 displays that amount that would be left

only thing i can think of is a hidden column to calculate whilst incorporating an if statement into B & C?

View 1 Replies View Related

Print Running Totals

Apr 6, 2009

Can we print out runing totals, i.e. for data on single worksheet at the time of printout I would like to print carried forward total at the end of the page and brought forward total at the starting of the next page

View 4 Replies View Related

Create A Running Timer

Jul 18, 2009

am planning to create a "constant time monitor" in the cell to help monitor expiry dates of chemicals in cell.....the expiry date is predetermined and i can pull them using lookup or something (any better options?).....

I need help in creating the constant time monitors and keep them running and also changing colours as time winds down to give a visual signal to the cell that the chemical is expiring.....am attaching the sample sheet here...

View 9 Replies View Related

Running Total Formula

Sep 14, 2009

I've attached a sample workbook. I'm trying to have a running total on column F once column G is completed with a ship date. The formula I have right now is =IF(G2:G55<0,SUM(F2:F22),0). but it's coming up w/zero.

View 2 Replies View Related

Keeping A Running Count

Sep 29, 2009

I have a spreadsheet that has numbers in column A (example = 31, 15, 159) I want to count the number (159) each time it occurs and keep a running count of it in say column B... example..... A1 = 159, A2 = 31, A3 = 159, so B3 would show (2) as the number 159 has appeared 2 times thus far.

View 3 Replies View Related

Macros Are Blocked From Running

Nov 19, 2009

When I send a workbook with macros to some of my users, they either can not open the workbook due to there being macros or they have to enable them each time the workbook is opened. I know there is a way to correct this, but I don't know how to look this up in help so I am coming to my trusted friends on Excel Forum. I would also like to know what this is called as I slightly remember that there is a name for this.

View 5 Replies View Related

Running Count In Horizontal Row?

Jan 24, 2010

Is there any way to create a running count in one horizontal thread? I can create a running count in vertical columns,but not horizontal threads?

I have a spreadsheet that I want to keep track of how many rounds mulitple weapons have fired. I have a current rounds cell, a last fired cell and total rounds cell. The problem is that when I enter the number of rounds shot in the "last fired cell", the sum of the total rounds cell goes up (via the sum function) however, is there a way to keep that number there, even though I will replace the last fired cell with a new number the next time I fire the weapon?

View 4 Replies View Related

Running Multiple Applications

Apr 4, 2014

I am trying to run multiple applications. I can run one application i.e.

Application.Run (Sheets("Sheet2").Range("A8").Value) but not multiple i.e Application.Run (Sheets("Sheet2").Range("A8").Value) & Application.Run (Sheets("Sheet2").Range("A9").Value) at the same time.

I have also tried Application.Run (Sheets("Sheet2").Range("A8:A9").Value) but to no avail.

View 4 Replies View Related

Running A Macro On Save?

Apr 10, 2014

I'm trying to get a macro to run when the user presses the save button. I have the following code:

[Code] .......

This code is supposed to apply the TRIM function to every worksheet in the workbook when the user presses save, and the saves the results. I understand the Private Sub bit is the code to have the macro run during the save, but for some reason the macro itself isn't actually running. I'm not getting any error message, its just that the cells which should have the TRIM function applied to them aren't being corrected.

View 4 Replies View Related







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