Cannot jump to 'Application' because it is hidden?

Zachary902

New Member
Joined
Nov 5, 2013
Messages
7
I get this warning when i run my code, and cannot figure out what it means? Would somone be able to tell me?

I only have one case within my case statements because i am in the beginning stages.

What the program is suppose to do is find the intersection of the two ranges set by the case statments and add the daily hours to the current hours in that cell that was found at the intersection.

Dim MonthName As String
Dim CropName As String
Dim CurrentHrs As Integer
Dim DailyHrs As Integer
Dim Rng1 As Range
Dim Rng2 As Range
Sheets("278DH## Daily Summary").Select
MonthName = Range("E2")
CropName = Range("E13")
Sheets("Crop Hours Log").Select
Select Case CropName
Case "Wheat"
'Set Rng1 = currentWorksheet.Range(currentWorksheet.Cells(3, 5), currentWorksheet.Cells(14, 5))
Set Rng1 = Range("E3:E14")

End Select

Select Case MonthName
Case "January"
'Set Rng1 = currentWorksheet.Range(currentWorksheet.Cells(3, 5), currentWorksheet.Cells(3, 42))
Set Rng1 = Range("E3:AP3")

End Select
Application.Intersect(Range(Rng1), Range(Rng2)).Select
Selection = CurrentHrs
Range("G30").Select
Selection = DailyHrs
CurrentHrs = CurrentHrs + DailyHrs
Application.Intersect(Range(Rng1), Range(Rng2)).Select
Selection.Paste
End Sub
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Code:
Application.Intersect(Range(Rng1), Range(Rng2)).Select

should be

Code:
Application.Intersect(Rng1, Rng2).Select
 
Upvote 0
That got rid of that error shg. now i am getting a runtime error-5, identifier under cursor is not reconized on the line i have bolded

Dim MonthName As String
Dim CropName As String
Dim CurrentHrs As Integer
Dim DailyHrs As Integer
Dim Rng1 As Range
Dim Rng2 As Range
Dim insect As Range
Sheets("278DH## Daily Summary").Select
MonthName = Range("E2")
CropName = Range("E13")
Sheets("Crop Hours Log").Select
Select Case CropName
Case "Wheat"
'Set Rng1 = currentWorksheet.Range(currentWorksheet.Cells(3, 5), currentWorksheet.Cells(14, 5))
Set Rng1 = Range("E3:E14")

End Select

Select Case MonthName
Case "February"
'Set Rng1 = currentWorksheet.Range(currentWorksheet.Cells(3, 5), currentWorksheet.Cells(3, 42))
Set Rng1 = Range("E4:AP4")

End Select
Set isect = Application.Intersect(Rng1, Rng2).Select
Selection = CurrentHrs
Range("G30").Select
Selection = DailyHrs
CurrentHrs = CurrentHrs + DailyHrs
Application.Intersect(Range(Rng1), Range(Rng2)).Select
Selection.Paste
 
Upvote 0
First, you should put Option Explicit at the top of every module; insect <> isect

Second, remove the .Select at the end of the line. You're setting an object variable; you can select it (if you need to) later.
 
Upvote 0

Forum statistics

Threads
1,223,246
Messages
6,170,996
Members
452,373
Latest member
TimReeks

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top