[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Range of boject-worksheet failed

Posted on 2013-10-22
4
Medium Priority
?
166 Views
Last Modified: 2013-10-22
Folks,
In the below code at the very first line I am getting this error:
Method 'Range of Object_worksheet failed.
Private Sub cmdCheckTDT_Click()
If Range(A8).Text = "Football game: Tyle vs Winston starts 16.10.2013 exactly at 16:00 !!" Then
    Range("A7").Locked = False
    Range("A7").Font.Color = vbWhite
    Range("A7").Interior.Color = vbRed
    Range("A7").Value = "Correct"
    
Else
    Range("A7").Value = "Error"
    Range("A7").Font.Color = vbYellow
    Range("A7").Interior.Color = vbBlack
    Range("A7").Locked = True
    CheckFormulaFunction
    Exit Sub
End If
FormulasOK

End Sub

Open in new window

Here's the code in A8:
=B4 & " starts " & TEXT(B5,"DD.MM.YYYY") & " exactly at " & TEXT(B6,"hh:mm") & " !!"

Open in new window


I'm simply trying to pull what's in A8 to what should be in A8 and that determines what happens next.
0
Comment
Question by:Frank Freese
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 19

Accepted Solution

by:
Ken Butters earned 2000 total points
ID: 39591979
try putting A8 in double quotes.

If that doesn't work you may need to more explicity identify the range you are referring to...

example : thisWorkbook.sheets("Sheet1").Range("A8")
0
 

Author Comment

by:Frank Freese
ID: 39592021
OK folks - I think I foundthe error of my ways
Range(A8) needs to be Range ("A8")
0
 

Author Comment

by:Frank Freese
ID: 39592036
I've requested that this question be deleted for the following reason:

Saw what I did wrong and resolved it myself
0
 

Author Closing Comment

by:Frank Freese
ID: 39592037
thanks - I came to the same conclusion
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes how you can use Custom Document Properties to store settings and other information in your workbook so that they will be available the next time you open the workbook.
If you need to forecast numbers -- typically for finance -- the Windows and Mac versions of Excel 2016 have a basket of tools to get the job done.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question