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: 1
Default SaveAs File Path Method


I'm having a bit of trouble with the
"Application.Dialogs(xlDialogSaveAs).Show(SvNm 1)". It's been working in
my other programs but this one isn't navigating to the specified path.
I'm calling the function from within a Form, once the user clicks
'Done' it calls "Call SaveFileAs" plus rattles off a few other things.

Here is the code located in Module1:

Sub SaveFileAs()
Dim ck As Boolean
Dim SvNm1 As String
Dim fcount As String
Dim DcName As String
fcount = Range("j3")
DcName = WD1.TextBox2.Text 'WD1 = UserForm

If fcount < 33000 And fcount 31999 Then
SvNm1 = "\\bnefile\data\Works Docket\WD\32000\" & fcount & "-"
& WD1.TextBox2.Text
ElseIf fcount < 34000 And fcount 32999 Then
SvNm1 = "\\bnefile\data\Works Docket\WD\33000\" & fcount & "-"
& WD1.TextBox2.Text
ElseIf fcount < 35000 And fcount 33999 Then
SvNm1 = "\\bnefile\data\Works Docket\WD\34000\" & fcount & "-"
& WD1.TextBox2.Text
ElseIf fcount < 36000 And fcount 34999 Then
SvNm1 = "\\bnefile\data\Works Docket\WD\35000\" & fcount & "-"
& WD1.TextBox2.Text
ElseIf fcount 35999 Then
MsgBox "Out of Range!"
Workbooks(1).Activate
Application.DisplayAlerts = False
ActiveWindow.Close
Application.DisplayAlerts = True
End If

ck = Application.Dialogs(xlDialogSaveAs).Show(SvNm1)

If ck = True Then
newName = ActiveWorkbook.Name
Else
Workbooks(1).Activate
Application.DisplayAlerts = False
mycount = Range("j3") - 1
Workbooks(1).Worksheets(2).Activate
Range("j3") = mycount
Workbooks(1).Worksheets(1).Activate
Range("j3") = mycount
Call Save
ActiveWindow.Close
Application.DisplayAlerts = True
End If
End Sub

If anyone could point me in the right direction, that would be
appreciated.

Kartune85.


--
kartune85
------------------------------------------------------------------------
kartune85's Profile: http://www.excelforum.com/member.php...o&userid=35586
View this thread: http://www.excelforum.com/showthread...hreadid=553491

 
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
Problem using SaveAs method Sujata Excel Discussion (Misc queries) 4 March 30th 10 07:21 AM
SaveAs Method changes Worksheet Name nmagerl[_3_] Excel Programming 4 June 1st 05 03:44 PM
A little help with SaveAs Method please Stitch45 Excel Programming 1 April 30th 05 01:41 AM
SaveAs and relative path dev[_2_] Excel Programming 2 December 19th 03 02:50 PM
SaveAs method L Buchy Excel Programming 1 July 11th 03 11:27 PM


All times are GMT +1. The time now is 03:26 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"