Click here to Skip to main content
15,906,708 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionVBA: Searching for a range in a worksheet. Pin
cyrossis11-Jan-11 4:13
cyrossis11-Jan-11 4:13 
AnswerRe: VBA: Searching for a range in a worksheet. Pin
Simon_Whale11-Jan-11 4:34
Simon_Whale11-Jan-11 4:34 
AnswerRe: VBA: Searching for a range in a worksheet. Pin
Dr.Walt Fair, PE11-Jan-11 9:18
professionalDr.Walt Fair, PE11-Jan-11 9:18 
GeneralRe: VBA: Searching for a range in a worksheet. Pin
Luc Pattyn11-Jan-11 10:07
sitebuilderLuc Pattyn11-Jan-11 10:07 
GeneralRe: VBA: Searching for a range in a worksheet. Pin
Dr.Walt Fair, PE11-Jan-11 10:10
professionalDr.Walt Fair, PE11-Jan-11 10:10 
GeneralRe: VBA: Searching for a range in a worksheet. Pin
cyrossis11-Jan-11 19:24
cyrossis11-Jan-11 19:24 
GeneralRe: VBA: Searching for a range in a worksheet. [modified] Pin
cyrossis11-Jan-11 18:44
cyrossis11-Jan-11 18:44 
QuestionVBA FTP Pin
Dalek Dave10-Jan-11 12:41
professionalDalek Dave10-Jan-11 12:41 
I am attempting to write a macro so that within an Excel Worksheet I call it, and it saves the .xlsm, saves as a web page and then opens the ftp (in this case filezilla).

I am now stuck.

Where I want to go with this is that the ftpclient automatically opens on the correct website.
(We have several)
After that I am happy to select the files to upload and close.

I have embedded a hyperlink in the file at cell A1.

I suspect that I may need to somehow put the host/username/password into the macro somewhere and get it called on the call of the ftpclient.

Can anybody suggest where I am going wrong?

VB
Sub Macro2()
'
' Macro2 Macro
'

'
    ActiveWorkbook.SaveAs Filename:="C:\Users\David\Desktop\Book1.xlsm", _
        FileFormat:=xlOpenXMLWorkbookMacroEnabled, CreateBackup:=False
    Application.DisplayAlerts = False
    With ActiveWorkbook.PublishObjects.Add(xlSourceWorkbook, _
        "C:\Users\David\Desktop\Book1.htm", , , xlHtmlStatic, "Book1_31795", "")
        .Publish (True)
        .AutoRepublish = True
    Application.DisplayAlerts = True
    End With
    Application.Left = 161.5
    Application.Top = 91.75
    Range("a1").Select
    Selection.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True
End Sub

------------------------------------

I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave

CCC League Table Link
CCC Link[^]

AnswerRe: VBA FTP Pin
Luc Pattyn10-Jan-11 13:11
sitebuilderLuc Pattyn10-Jan-11 13:11 
GeneralRe: VBA FTP Pin
Dalek Dave10-Jan-11 13:30
professionalDalek Dave10-Jan-11 13:30 
GeneralRe: VBA FTP Pin
Luc Pattyn10-Jan-11 14:16
sitebuilderLuc Pattyn10-Jan-11 14:16 
AnswerRe: VBA FTP Pin
shreekar18-Jan-11 5:33
shreekar18-Jan-11 5:33 
GeneralRe: VBA FTP Pin
Dalek Dave18-Jan-11 5:37
professionalDalek Dave18-Jan-11 5:37 
Question[VB.NET 2010] Sending mail only works sometimes Pin
The Mighty Atom10-Jan-11 12:09
The Mighty Atom10-Jan-11 12:09 
AnswerRe: [VB.NET 2010] Sending mail only works sometimes Pin
Luc Pattyn10-Jan-11 12:48
sitebuilderLuc Pattyn10-Jan-11 12:48 
GeneralRe: [VB.NET 2010] Sending mail only works sometimes Pin
The Mighty Atom10-Jan-11 14:03
The Mighty Atom10-Jan-11 14:03 
AnswerRe: [VB.NET 2010] Sending mail only works sometimes Pin
Luc Pattyn10-Jan-11 14:10
sitebuilderLuc Pattyn10-Jan-11 14:10 
AnswerRe: [VB.NET 2010] Sending mail only works sometimes Pin
Estys10-Jan-11 23:38
Estys10-Jan-11 23:38 
GeneralRe: [VB.NET 2010] Sending mail only works sometimes Pin
Dalek Dave11-Jan-11 0:02
professionalDalek Dave11-Jan-11 0:02 
GeneralRe: [VB.NET 2010] Sending mail only works sometimes Pin
Estys11-Jan-11 0:08
Estys11-Jan-11 0:08 
GeneralRe: [VB.NET 2010] Sending mail only works sometimes Pin
Dalek Dave11-Jan-11 0:30
professionalDalek Dave11-Jan-11 0:30 
GeneralRe: [VB.NET 2010] Sending mail only works sometimes Pin
Luc Pattyn11-Jan-11 1:29
sitebuilderLuc Pattyn11-Jan-11 1:29 
GeneralRe: [VB.NET 2010] Sending mail only works sometimes Pin
Fabio Franco12-Jan-11 0:42
professionalFabio Franco12-Jan-11 0:42 
AnswerRe: [VB.NET 2010] Sending mail only works sometimes Pin
_Erik_11-Jan-11 1:43
_Erik_11-Jan-11 1:43 
GeneralRe: [VB.NET 2010] Sending mail only works sometimes Pin
The Mighty Atom11-Jan-11 5:29
The Mighty Atom11-Jan-11 5:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.