Results 1 to 11 of 11

Thread: Solved

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2003
    Posts
    7

    Solved

    I have an Excel addin in VBA that must be written without the common dialog box control. I have a SaveAs dialog box that I call by:

    Application.Dialogs(xlDialogSaveAs).Show

    I get all of the default Save As Type extensions but must change the Save As Type to a custom extension (.cs2). The filter coding for common dialog box controls can't be used.

    Anyone know how to change the filter in the SaveAs dialog box?
    Last edited by feistdj; Mar 27th, 2003 at 01:58 PM.

  2. #2
    I don't do your homework! opus's Avatar
    Join Date
    Jun 2000
    Location
    Good Old Europe
    Posts
    3,863
    Hi,
    do you want EXCEL to save your file in another format ( i don'T think you can use any other format than those that are in the list) or do you just want to give your file another extension, without changing the format itself ( do that afterwards, outside the SaveAs)
    You're welcome to rate this post!
    If your problem is solved, please use the Mark thread as resolved button


    Wait, I'm too old to hurry!

  3. #3

    Thread Starter
    New Member
    Join Date
    Mar 2003
    Posts
    7
    I want the same format but with a different extension.

  4. #4
    I don't do your homework! opus's Avatar
    Join Date
    Jun 2000
    Location
    Good Old Europe
    Posts
    3,863
    In this case you could do a change of the extension afterwards (after SaveAs) as a change of FileName.

    VB Code:
    1. Name OldFileName As NewFileName
    You're welcome to rate this post!
    If your problem is solved, please use the Mark thread as resolved button


    Wait, I'm too old to hurry!

  5. #5

    Thread Starter
    New Member
    Join Date
    Mar 2003
    Posts
    7
    Thanks, I ended up doing it with a test.

    Set NewBook = Application.Workbooks.Add("C:\defproj.cs2")

    fName = Application.GetSaveAsFilename

    If Right(fName, 4) <> ".cs2" Then
    fName = fName & ".cs2"

    Else
    fName = fName

    End If


    NewBook.SaveAs FileName:=fName

  6. #6
    I don't do your homework! opus's Avatar
    Join Date
    Jun 2000
    Location
    Good Old Europe
    Posts
    3,863
    alright then,

    Thanks for putting SOLVED in the original topic, next time don't erase the original topic, just add the SOLVED.

    If you want to post code use the VB-Code tags . Before the code put "vbcode" and after the code "/vbcode" both surrounded by "[ ]"

    End for the code you posted, the part:
    VB Code:
    1. Else
    2. fName = fName
    is not neccessary.
    You're welcome to rate this post!
    If your problem is solved, please use the Mark thread as resolved button


    Wait, I'm too old to hurry!

  7. #7

    Thread Starter
    New Member
    Join Date
    Mar 2003
    Posts
    7
    Sorry for the untagged code. I am new to forums ( and programming for that matter).

    Thanks for you patience and help.

  8. #8
    I don't do your homework! opus's Avatar
    Join Date
    Jun 2000
    Location
    Good Old Europe
    Posts
    3,863
    No prob'.
    Stick to it, most of the things I learned was thru this Forum!
    You're welcome to rate this post!
    If your problem is solved, please use the Mark thread as resolved button


    Wait, I'm too old to hurry!

  9. #9
    Fanatic Member Mindcrime's Avatar
    Join Date
    Jun 2001
    Location
    Peterborough, UK
    Posts
    555
    Very descriptive title when someone needs to search for past threads.

    Change it back to the original thread title!!
    Mindcrime : )
    ICQ 24003332

    VB 5.0, VB 6.0 SP5, COM, DCOM, VB.NET Beta 2, Oracle 8

  10. #10
    I don't do your homework! opus's Avatar
    Join Date
    Jun 2000
    Location
    Good Old Europe
    Posts
    3,863
    I cwould say the same, but in this case?
    You raised the post (with this topic) to the top again, hoping for a guy, who didn't post anything since 1.apr.03, to change the topic again. I doubt he'll do/read it.
    You're welcome to rate this post!
    If your problem is solved, please use the Mark thread as resolved button


    Wait, I'm too old to hurry!

  11. #11
    Fanatic Member Mindcrime's Avatar
    Join Date
    Jun 2001
    Location
    Peterborough, UK
    Posts
    555
    I think I was just hoping

    Well I guess some people '...Just don't get it!' LOL

    Annoying don't you think?
    Mindcrime : )
    ICQ 24003332

    VB 5.0, VB 6.0 SP5, COM, DCOM, VB.NET Beta 2, Oracle 8

Posting Permissions

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



Click Here to Expand Forum to Full Width