LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default variable not set

I have this code, I wrote.
I am not very confortable with VBA, so I have a problem.

When it arrives at the last line it gives an error. Run-time error, 91 :
€œvariable not set€.

I cant understand why.

Dim UlinDez, UlinMovOr, UlinCarOr, UlinMovFn, UlinCarFn As String
Dim wbDez As Workbook
Dim wbMov As Workbook
Dim WbCar As Workbook
Dim FicDez, FicMov, FicCar As String
Dim Emp, Mes As String

FicDez = Application.GetOpenFilename
FicMov = Application.GetOpenFilename
FicCar = Application.GetOpenFilename

Mes = Application.InputBox("Indicar o mês")

Workbooks.OpenText Filename:=FicDez _
, Origin:=xlMSDOS, StartRow:=1, DataType:=xlDelimited,
Semicolon:=True, FieldInfo:=Array(Array(1, 1), _
Array(2, 1), Array(3, 1), Array(4, 1), Array(5, 1), Array(6, 1),
Array(7, 1), Array(8, 1), _
Array(9, 1), Array(10, 1)), TrailingMinusNumbers:=True

wbDez = ActiveWorkbook.Name

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
variable height variable width stacked bar charts ambthiru Charts and Charting in Excel 3 January 18th 06 11:41 PM
Getting inconsistent Error 91-Object variable or With block variable not set mfq Excel Programming 0 December 14th 05 06:08 PM
why is it saying sheetcnt is "variable not defined" how to do a global variable to share over multiple functions in vba for excel? Daniel Excel Worksheet Functions 1 July 9th 05 03:05 AM
Run-time error '91': "Object variable or With block variable not set Mike[_92_] Excel Programming 2 December 30th 04 10:59 AM
Cells.Find error Object variable or With block variable not set Peter[_21_] Excel Programming 2 May 8th 04 02:15 PM


All times are GMT +1. The time now is 04:40 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"