![]() |
#1
|
|||
|
|||
![]()
Hi,
Need help please. Any idea why VBA is returning the error message "invalid use of Null”? Many thanks Code:
Sub CreateEviewsPrg() Dim ItemName, nameoffile As String Dim stufftocopy As Variant Dim fso, oFile As Object Dim crange, c, loc As Range 'Set folder = Sheets("Parameters").Range("C9").Value With Worksheets("Prg_xSc") nameoffile = .Cells(1, 1).Value Set crange = Range(.Cells(1, 2).Value) Set stufftocopy = crange Set c = stufftocopy ItemName = ItemName + c.Text + vbCrLf Set fso = CreateObject("Scripting.FileSystemObject") Set oFile = fso.CreateTextFile("\\xxx\Eviews\" + CStr(nameoffile) + ".prg") oFile.WriteLine CStr(ItemName) 'ERROR HERE: "invalid use of Null” oFile.Close Set fso = Nothing Set oFile = Nothing End With End Sub |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
macro error message - interpretation | H28Sailor | Excel Programming | 3 | 03-03-2017 07:37 AM |
![]() |
ktest | Office | 1 | 02-12-2016 08:08 PM |
![]() |
moneal62 | Word VBA | 6 | 01-18-2016 07:54 PM |
![]() |
hlina | Excel | 1 | 10-08-2013 09:14 PM |
Error message | White House | Outlook | 1 | 12-07-2010 04:52 AM |