+ Reply to Thread
Results 1 to 2 of 2

Compile Error: Argument not optional

  1. #1
    Brett Smith
    Guest

    Compile Error: Argument not optional

    I am testing something because I am going to be programming the VBE behind
    several workbooks. I was testing the following and I got the error
    called..Compile Error: Argument not optional. Is there a reason why? Then
    it focused on the .Export function.

    Sub CopyOneModule()

    Dim FName As String

    With Workbooks("sirNAsequences7")
    FName = .Path & "\code.txt"
    .VBProject.VBComponents("Module1").Export
    FName
    End With
    Workbooks("Changemodulecode").VBProject.VBComponents.Import
    FName

    End Sub


  2. #2
    Mark Lincoln
    Guest

    Re: Compile Error: Argument not optional

    I believe FName needs to be in parentheses after Export. Export
    requires at minimum a valid filename.


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1