Blog Index, ASP into Excel UserForm

Joe Was

MrExcel MVP
Joined
Feb 19, 2002
Messages
7,539
MSDN news letter posted a code download for working with Blogs in VB/ASP Net.

http://msdn.microsoft.com/VBasic/Downloads/2005/Code/MyBlogs/


To work it needs a reference to the "MyBlogs.dll" in the project.

Just to play with it the most basic sample [List Blog Index] is something like [changed from VB DataViewGrid and Button1 to: Excel UserForm, TextBox & CommandButton, so it could be compatable with Excel]:

Private Sub CommandButton1_Click()
Dim MyFeed As MyBlogs.Feed

MyFeed = My.Blogs.Read("http://blogs.msdn.com/vbteam/Rss.aspx")
Me.TextBox1.Text = MyFeed.Entries
End Sub


Does anyone know if Excel can be made to work with Blogs?

I do not know if the "MyBlogs.dll" is compatible with Excel?

I think a Class can be made, based upon some code MicroSoft has, but the samples are for VB DataGridView objects: DataSource, which is is not compatible with VBA. So, I am not too sure where to start or if it will be a waste of time?

Has anyone any working "Blog" VBA code?
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Got something the oldfashion way, but it also lists some of the Html tags, which is crap. So I cannot use it, too bad no-one has any ideas on the 1st post above?

Note: For the below to work you need to set the Extensibility Reference!

Sub myBlogsText()
'Standard module code, like: Module1
Dim ie As Object
Dim myBlogs As Object
Dim myBlogDoc$

Const myURL As String = "http://blogs.msdn.com/vbteam/Rss.aspx"

Set ie = CreateObject("internetexplorer.application")
ie.Navigate myURL

While ie.ReadyState <> 4
On Error GoTo conectErr

If n > 3 Then GoTo conectErr
n = n + 1
Application.Wait (Now + TimeValue("0:00:01"))
DoEvents
Wend
GoTo myCont

conectErr:
MsgBox "Cannot get a connection to the Internet!"
GoTo myEnd

myCont:
Set myBlogs = ie.Document

myBlogDoc = myBlogs.body.innerText
MsgBox myBlogDoc

myEnd:
Set myBlogs = Nothing
Set ie = Nothing
End Sub
 
Upvote 0

Forum statistics

Threads
1,219,161
Messages
6,146,657
Members
450,706
Latest member
LGVBPP

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top