VBA Add Request Code Is Not Working

Jun 18, 2014

Every time I try to add the contents from the request form to the Master CCO tab, the information does not dump. The only way the form will close is if i hit the cancel button. I don't know what I've done wrong with the add request code.

View 1 Replies


ADVERTISEMENT

Simplifying QueryTable Request Code

Jul 10, 2008

I have the following code which works but is slow. All the code is the same except the address part and the destination range. Any help simplifying would be great. Also, every time I run the sub it asks me if I want to replace the destination cells. Is there any code to circumvent that? Lastly, although the second and third query requests have a different destination range, excel shifts the previous query to the right, hence first command after final query request.

View 10 Replies View Related

Add Option For Code To Request Source Column?

Feb 20, 2014

The below code uses data in column "A" (Const cl& = 1) to create a sheet for every unique value in column "A".

I would like for the code to request what column to use as source data. As an example when the code first runs a pop-up box would ask for a column letter to use as the source, after entering the letter (or corresponding column number) the code will execute.

Code:
Sub Add_sheets_from_A()
Range("XA1") = ActiveSheet.Name
ActiveSheet.Name = ("Add_Sheets")

[Code]....

View 3 Replies View Related

Excel 2010 :: VBA Code To Extract HTML Source Code Not Working On Google Sites

Dec 6, 2012

I have previously used the following code to successfully pull out IE webpage source code for string manipulation.

Its a crude example to demonstrate the principle:

Public Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Public IE As Object
Sub Sample()
Set IE = CreateObject("InternetExplorer.Application")
IE.Visible = True

[Code] ......

However when I substitute in a Google websites address into the IE.Navigate command, the code runs to the "Source_Code = IE.document ...." line then flags up a Microsoft Visual Basic error. "Run-time error '438': Object doesn't support this property or method"

The webpage that I am trying to access is a confidential company site, so you won't be able to access it yourself, but starts with [URL] ......

The one thing that I have noticed about this website is the Privacy Report icon in the lower right status window (Picture of an eye with a restricted symbol in front). I don't know whether this is the cause of my problem, or purely an incidental observation.

Is there something peculiar with Google sites that means that the source code cannot be extracted in general, or is this an issue specific to my site ? Does the Privacy Report icon have any relevance, and if so how do I switch that off ?

Using :
MS Excel 2010
IE Explorer 8.0

View 1 Replies View Related

Subtraction Macro Request

Jul 12, 2007

I have Time Data in one column, and Values in the next, and then a blank column (for calculations, like subtraction/time).

Is there any way to automate the =Cell2-Cell1 command for regions of blue cells and have it paste the value in the blank column lined up with the first blue cell of the region?

The attachment will make more sense, but this is what I'm talking about:

Before subtraction macro:

BlueTime1 Value Blank BlueTime4 Value Blank
BlueTime2 Value Blank BlueTime5 Value Blank
BlueTime3 Value Blank BlueTime6 Value Blank
Blank Blank Blank Blank Blank Blank
BlueTime7 Value Blank BlueTime10 Value Blank
BlueTime8 Value Blank BlueTime11 Value Blank
BlueTime9 Value Blank BlueTime12 Value Blank

After subtraction macro:

BlueTime1 Value BlueTime3-BT1 BlueTime4 Value BlueTime6-BT4
BlueTime2 Value Blank BlueTime5 Value Blank
BlueTime3 Value Blank BlueTime6 Value Blank
Blank Blank Blank Blank Blank Blank
BlueTime7 Value BlueTime9-BT7 BlueTime10 Value BlueTime12-BT10
BlueTime8 Value Blank BlueTime11 Value Blank
BlueTime9 Value Blank BlueTime12 Value Blank

View 11 Replies View Related

Request For A Macro To Get Average

Apr 10, 2008

I have a sheet with the data in the following way(its just a sample).................

now where ever i have ave i need to get the average of the range below it. Example: for the first ave i should calculate ave of new two rows cause the next row would be the ave of next range. I have close to 15000 rows and 135 columns of data like this.

View 4 Replies View Related

Formula Request For Whole Column

Feb 11, 2005

I have a column of a few hundred numbers (price's). All the price's in the whole column need to be calculated with this formula: (price/119)*100. how to do this in excel 2003?

View 8 Replies View Related

% Percentage Formula Request

Jun 1, 2006

Formula request

I need to ( in currency)
Example
Col B = $2.06 . Col C = $3.42

I need to in Col D to calc the difference between B and C less 25%.
So in the above example D should = $2.90

View 6 Replies View Related

Prevent Outlook Access Request

Apr 3, 2007

"Prevent Outlook Access Request" but it kept binning the Request Part. So sorry in advance for the misguidance.

Second up :-

when i use the below code

Private Sub CommandButton22_Click()
Sheets("Sheet1").Select
Range("A1:Z1").Select
Selection.Copy
Workbooks.Open ("\ifdata002opsqual$Quality_and_RiskLive LogLive Log2.xls")
If ActiveCell.Value = Empty _
Then ActiveCell.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False _
Else:
Do Until ActiveCell.Value = Empty
ActiveCell.Select
ActiveCell.Offset(1, 0).Select
Loop

Outlook always asks "A program is trying to access Outlook - do you want to prevent access or allow" (or words to that affect) then you choose a time you allow it access.

Is there a way to prevent that daft wee box appearing - is this an Outlook issue more than excel? If it is outlook is there any way i can code it into excel to prevent the request coming up?

View 8 Replies View Related

What Row Is Code Working On

Nov 27, 2008

I'm using Excel 2007.

Is it possible to know which row code is active on whilst it is running?

s/s is 332324 rows and growing. When I run code which goes down one column and takes quite some time I don't know what stage it is at.

I'd like to be able to see on screen which row it is down to.

View 14 Replies View Related

Code Is Not Working

Apr 24, 2007

Function AH02(FIF, xi, di, zi, nt, TAI, ZMT, xi2, nr)

fit1 = Array(0.1352785, 0.02388504, -0.0007874863, -0.008694193, -0.01137302, 0.0004262445, 0.0001408564, 0.001013715, -0.00004032109, 0.006176128, -0.03644328, 0.001557726, 0.0483096, 0.01859556, -0.0008903489, -0.006407128, -0.001693491, 0.00008581065)
fit2 = Array(0.01184698, 0.01976108, -0.0008787826, -0.03195365, -0.01083098, 0.0005161274, 0.004048458, 0.001013387, -0.00005030517, -0.003262156, -0.003314432, 0.0001453592, 0.005082949, 0.001888962, -0.0000865367, -0.0006340434, -0.0001799523, 0.000008493003)
fit = Array(0.1352785, 0.02388504, -0.0007874863, -0.008694193, -0.01137302, 0.0004262445, 0.0001408564, 0.001013715, -0.00004032109, 0.006176128, -0.03644328, 0.001557726, 0.0483096, 0.01859556, -0.0008903489, -0.006407128, -0.001693491, 0.00008581065, 0.01184698, 0.01976108, -0.0008787826, -0.03195365, -0.01083098, 0.0005161274, 0.004048458, 0.001013387, -0.00005030517, -0.003262156, -0.003314432, 0.0001453592, 0.005082949, 0.001888962, -0.0000865367, -0.0006340434, -0.0001799523, 0.000008493003)

ermess = 0
t = TAI
L = 1
If (nr > 40) Then GoTo 900
10 If (nr < 1) Then GoTo 900
11 L = 2

View 9 Replies View Related

VBA-code Not Working

Feb 10, 2009

I have the next VBA-

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Me.Range("E:N")) Is Nothing Then
If Range("E34").Value = 0 Then
Application.EnableEvents = False
Range("G8").Value = Range("G8").Value + 1
If Range("J34").Value = 0 Then
Application.EnableEvents = False
Range("G9").Value = Range("G9").Value + 1
Application.EnableEvents = True
End If
End If
End If
End Sub

The code don't work. What's wrong with it?

View 9 Replies View Related

Generate Request ID With Date And Auto Number?

Jan 6, 2014

I facing a problem to generate request id number. Actually i need to generate id like example "RQ1013-01" where "RQ" is constant word, "1013" is month and year while "-01"is generated number. and every month i want the id number start from -00 back. thus in a month there is only 99 request is available.

View 6 Replies View Related

Calculating Business Hours Of Service Request

Apr 12, 2012

I'm trying to find a formula for calculating the number of business hours a service request may be open; this request may have been opened and even closed outside of business hours. I found a formula that appears to be working:

=(NETWORKDAYS(StartDate&TimeCell,StopDate&TimeCell,holidays)-1)*(CloseTimeColumnLetter$CloseTimeRowNumber-OpenTimeColumnLetter$OpenTimeRowNumber)+IF(NETWORKDAYS(StopDate&TimeCell,StopDate&TimeCell,holidays),MEDIAN(MOD(StopDate&TimeCell,1),CloseTimeColumnLetter$CloseTimeRowNumber, OpenTimeColumnLetter$OpenTimeRowNumber),CloseTimeColumnLetter$CloseTimeRowNumber)-MEDIAN(NETWORKDAYS(StartDate&TimeCell,StartDate&TimeCell,holidays)*MOD(StartDate&TimeCell,1),
CloseTimeColumnLetter$CloseTimeRowNumber, OpenTimeColumnLetter$OpenTimeRowNumber)

What I don't know is HOW it works, I don't know what any of those formula's mean (with the exception of NETWORKDAYS). I'm trying to "show my work".

View 1 Replies View Related

Formula Request To Search For Blank Cells

Jun 5, 2009

I am looking for a formula that will search a range on multiple worksheets for the FIRST blank cell and then make that cell the current active cell.

View 9 Replies View Related

Code Not Working On Windows97

Nov 14, 2008

I got this code off here and it works really well on my home pc which is using widows 2000 however i need it for work and they are using windows 97.

I get an error with the code in red. I have attached the sheets this refers to, and when i run the code it deletes the dates it matches up with in the master rota sheet which it shouldn't

View 4 Replies View Related

Code Not Working As Planned

Apr 14, 2009

Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
If IsNumeric(Target.Value) Then
'Clear the Invalid entry
Range("L4").ClearContents
Range("L5").ClearContents

If Target.Address = "$K$4" Then
Range("K5").ClearContents
ElseIf Target.Address = "$K$5" Then
Range("K4").ClearContents
End If
Else
Range(Target.Address).ClearContents
Target.Next = "Invalid Input"
End If..........

However for L28, L29, L48, and L49 the invalid input entry is not showing up properly.

View 2 Replies View Related

Add Code To A Module That Is Already Working

May 12, 2009

I am trying to add code to a module that is already working. however when trying to add new code i keep on getting error messages. It doesnt like the "next i" see attachment.

all else works except for the WEEK1 tab. I am trying to get it so if the "Date Submitted" colum on the MAIN tab is between 5/3/09 - 5/9/09 it will go to tab "WEEK1"

5/10/09 - 5/16/09 to WEEK2
5/17/09 - 5/23/09 to WEEK3
5/24/09 - 5/30/09 to WEEK4

View 4 Replies View Related

'Save As' Code Not Working

Oct 29, 2009

Dim myFileName As String
Dim myworksheet As Variant

myworksheet = ThisWorkbook.ActiveSheet

myFileName = ThisWorkbook.ActiveSheet.Range("h1").Value
ChDir "C:TechnologyComponents"

ActiveWorkbook.saveas Filename:=myFileName

There is only one sheet in this workbook, the sheet name changes each time I run other codes. I am bringing the value of the sheet name into a H1 cell and trying to save with that name.

View 14 Replies View Related

Combobox Code Is Not Working

Nov 17, 2011

THe below have written for comboBox selection when I run thourgh form and commandButton code is not working but when run single (Seperately) code will get execute.

Private Sub CommandButton1_Click()
Dim Mydate As Date
Mydate = Date

[Code].....

View 1 Replies View Related

VBA Code Not Working On Another Computer?

May 22, 2013

I have made a program using excel vba with userforms, however upon using it on another or any computer with the same version of Office(2007) i am getting a debugging error and highlighting any lines with the words "format" & "date" in the vba code.

View 3 Replies View Related

VBA Code Not Working As Intended

Nov 6, 2009

Why is the following code not running the macro the number of times I type into the box?


Sub Macro10()
'Sub RunABunch()
Dim ans As Variant, i As Long
ans = Application.InputBox("Enter a Number of loops", Type:=1)
If Not IsNumeric(ans) Then
' user hit cancel, so exit sub
Exit Sub
End If
For i = 1 To CLng(ans)
' do your work here
Next i
' Macro10 Macro
'
'
Cells.Find(What:="Chief", After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False, SearchFormat:=False).Activate
Selection.Cut
ActiveCell.Offset(0, 2).Range("A1").Select
ActiveSheet.Paste
End Sub

I didnt write the loop and input portion of the code, I just recorded the macro and added that bit of code from the net.

View 9 Replies View Related

Code For SORT Is Not Working

Jan 20, 2010

why my vba code for sort is not working here. When I do F8 it simply passes the sort code (the one in red) with no action happening. Why.? and do I need to do. Thanks.


Sub Macro1()
'
' Macro1 Macro
'
Sheets(1).Copy Before:=Sheets(1)
ActiveSheet.Rows("1:2").EntireRow.Delete shift:=xlUp
ActiveSheet.Columns("C:M").EntireColumn.Delete shift:=xlToLeft

With ActiveSheet
With Range("A1:C10000")
.Sort key1:=Range("B2"), order1:=xlAscending, Header:=xlGuess,_
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal

End With
End With

View 9 Replies View Related

HPageBreak Code Not Working

Jan 18, 2006

In the EXCEL helpfile, there is an example code under HPageBreaks Property:

For Each pb In Worksheets(1).HPageBreaks
If pb.Extent = xlPageBreakFull Then
cFull = cFull + 1
Else
cPartial = cPartial + 1
End If
Next
MsgBox cFull & " full-screen page breaks, " & cPartial & _
" print-area page breaks"

However, I can't get the code to run. I am consistently getting an error :

Run Time Error "9" : Subscript out of range on very first line of the code. How can one get a subscript out of range with a "For each ... Next" statement ?!!

I cite this as an example, since I am unable to create workable code using HPageBreaks, which I need to...

View 9 Replies View Related

Repeat Formula And Make It Dynamic Depending On Request

Feb 8, 2014

I would like to repeat a formula and make its dynamic depending on the request.

The formular that I would like to repeat is:

=IF(ISERROR(INDEX(Data!$A$2:$G$14997,SMALL(IF(Data!$A$2:$A$14997=$D$2,ROW(Data!$A$2:$A$14997)),ROW(985:985))-1,3)),"",INDEX(Data!$A$2:$G$14997,SMALL(IF(Data!$A$2:$A$14997=$D$2,ROW(Data!$A$2:$A$14997)),ROW(985:985))-1,3))

View 2 Replies View Related

Unprotected Sheet Code Not Working?

Jun 9, 2014

I'm currently using a vba script to unprotect all of my worksheets within my workbook in order to refresh the pivots and then protect them again once the pivots are completed, but there are two worksheets I would like to remain unprotected in order for users to be able to edit them after the pivots have been refreshed. Now I've tried adding a sub code in order to unprotect one of the sheets as a test to see if it will allow me to edit the worksheet after I update the pivots. Unfortunately the coding isn't working, and the worksheet is still remaining in protect mode. Here's the code I am using to protect the worksheets when refreshing the pivot as well as the code I am attempting to use in order to unprotect the one worksheet.

View 4 Replies View Related

VBA Code Not Working When I Protect The Sheet

Nov 9, 2008

I have used the below code to make hide/unhide some columns in my excel sheet. It works fine. Now, I need to protrect the sheet except the coloured cells. So I unlocked the cell by clicking the property of the colored cells & then did this :- tools- protection-Protect sheet - protect unlocked cells. But after protecting this sheet the macro code of hiding/unhiding of the columns are NOT WORKING & Errors is coming. I have used the below code:-

View 4 Replies View Related

Clear Contents Code Not Working

Sep 15, 2009

This code is supposed to clear the contents of row 6 cell if the contents of row 5 cell is blank/cleared. I get an error on the "If Intersect" Line. What's wrong?

View 4 Replies View Related

Freeze Panes Code Not Working.

Oct 27, 2009

Freeze Panes Code not working.
Below is the code im not sure whats up with it?

View 3 Replies View Related

Code To Unlock Password Not Working

Apr 4, 2014

I have a workbook whose worksheets I want to protect on open, and also want to unprotect by way of a module. The protect code is:

Code:
Private Sub Workbook_Open()
Sheets("Cornealrings").Protect Password:="elohim"
Sheets("Ferrararings").Protect Password:="elohim"
Sheets("Kera Rings").Protect Password:="elohim"
Sheets("IS CALCULATOR").Protect Password:="elohim"
Sheets("IS Manager").Protect Password:="elohim"
End Sub

The unprotect code is:

Code:
Sub Unprotect()
Sheets("Cornealrings").Unprotect Password:="elohim"
Sheets("Ferrararings").Unprotect Password:="elohim"
Sheets("Kera Rings").Unprotect Password:="elohim"
Sheets("IS CALCULATOR").Unprotect Password:="elohim"
Sheets("IS Manager").Unprotect Password:="elohim"
End Sub

The code stops at the first line of the unprotect event, with the message that the password is not correct. If I try to manually unprotect, the password is accepted.

View 7 Replies View Related







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