Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Variable without block not set

Posted on 2014-01-14
1
Medium Priority
?
207 Views
Last Modified: 2014-01-14
I am getting an error block without variable not set in the below code stoping a Meta.Select line.



Public Function iArchive() As Boolean
On Error GoTo BadOut
iArchive = False
Dim ArcName As String, ABC As String

Meta.Select
ArcPath = Meta.Range("ArcPath").Offset(iModal, 0).Value

ArcName = ArcPath & "\" & "Premium" & Right("0" & Month(Now()), 2) _
    & Right("0" & Day(Now()), 2) & Year(Now()) & ".ARC"

    ABC = Dir(ArcPath, vbDirectory)
    If Zoid = "" Then
        MsgBox "Creating Archive directory " & ArcPath
        MkDir ArcPath
    End If

ActiveWorkbook.SaveAs ArcName
EndGame:
Application.Calculation = xlCalculationAutomatic
iArchive = True
Exit Function
BadOut:
MsgBox "iArchive function failed! " & Err.Description, vbCritical


End Function
0
Comment
Question by:leezac
[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
1 Comment
 
LVL 19

Accepted Solution

by:
Ken Butters earned 2000 total points
ID: 39779420
Looks like your variable "Meta" may not be initialized?

What type of object is "Meta"?  

Your existing code does not define it... nor does it show where it is initialized.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
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…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

718 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