Solved

Variable without block not set

Posted on 2014-01-14
1
203 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 500 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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

Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
Improved? Move/Copy Add-in Replacement - How to avoid the annoying, “A formula or sheet you want to move or copy contains the name XXX, which already exists on the destination worksheet.” David Miller (dlmille)  It was one of those days… I wa…
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.

752 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