• Skip to main content
  • Skip to header right navigation
  • Skip to site footer

My Online Training Hub

Learn Dashboards, Excel, Power BI, Power Query, Power Pivot

  • Courses
  • Pricing
    • Free Courses
    • Power BI Course
    • Excel Power Query Course
    • Power Pivot and DAX Course
    • Excel Dashboard Course
    • Excel PivotTable Course – Quick Start
    • Advanced Excel Formulas Course
    • Excel Expert Advanced Excel Training
    • Excel Tables Course
    • Excel, Word, Outlook
    • Financial Modelling Course
    • Excel PivotTable Course
    • Excel for Customer Service Professionals
    • Excel for Operations Management Course
    • Excel for Decision Making Under Uncertainty Course
    • Excel for Finance Course
    • Excel Analysis ToolPak Course
    • Multi-User Pricing
  • Resources
    • Free Downloads
    • Excel Functions Explained
    • Excel Formulas
    • Excel Add-ins
    • IF Function
      • Excel IF Statement Explained
      • Excel IF AND OR Functions
      • IF Formula Builder
    • Time & Dates in Excel
      • Excel Date & Time
      • Calculating Time in Excel
      • Excel Time Calculation Tricks
      • Excel Date and Time Formatting
    • Excel Keyboard Shortcuts
    • Excel Custom Number Format Guide
    • Pivot Tables Guide
    • VLOOKUP Guide
    • ALT Codes
    • Excel VBA & Macros
    • Excel User Forms
    • VBA String Functions
  • Members
    • Login
    • Password Reset
  • Blog
  • Excel Webinars
  • Excel Forum
    • Register as Forum Member

Get an image link with the vba from a web page|VBA & Macros|Excel Forum|My Online Training Hub

You are here: Home / Get an image link with the vba from a web page|VBA & Macros|Excel Forum|My Online Training Hub
Avatar
sp_LogInOut Log In sp_Registration Register
sp_Search Search
Advanced Search|Last Search Results
Search
Forum Scope




Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Search Search
sp_RankInfo
Lost password?
sp_CrumbsHome HomeExcel ForumVBA & MacrosGet an image link with the vba from…
sp_PrintTopic sp_TopicIcon
Get an image link with the vba from a web page
Avatar
A.Maurizio
Member
Members
Level 0
Forum Posts: 202
Member Since:
June 26, 2016
sp_UserOfflineSmall Offline
1
March 12, 2019 - 5:51 am
sp_Permalink sp_Print

Hello everyone, my name is Maurizio
And my new problem is this:
According to you it is possible to derive from a vba code a link of an image that can vary in automatic form.
For example :
The image from full sun; For this his link will be written in a certain way.
Tomorrow: The image gives me Cloudy: For this his link will be written in another way.
For here obtained the Fatitico Link: this should be pasted in the sheet 2 in the column (A).
A little like I did in Manual format.
Thanks so far for all the help you want to give me about Greetings from A.Maurizio

Avatar
Philip Treacy
Admin
Level 10
Forum Posts: 1510
Member Since:
October 5, 2010
sp_UserOfflineSmall Offline
2
March 12, 2019 - 9:46 am
sp_Permalink sp_Print

Hi Maurizio,

Your code is looking for elements with the HTML class name "sunny" but I don't see anything on the page that has that class name.  The images could be identified by their ALT text or their Title though.

I would save all the images into the workbook, then based on the weather for the day load them into the relevant sheet/cell.  Please make sure that you are not breaking any legal/terms of use agreement by doing this.

A couple of notes on programming.  Never turn off error handling without dealing with any errors that could occur.  You have used On Error Resume Next but then if an error occurs, how do you know?  How do you know that your code is working?

When you use a declaration like this Dim Y, X As String you are declaring Y as a Variant.  If you want Y as a string, the declaration must be Dim Y as String, X as String

Phil

Avatar
A.Maurizio
Member
Members
Level 0
Forum Posts: 202
Member Since:
June 26, 2016
sp_UserOfflineSmall Offline
3
March 12, 2019 - 7:25 pm
sp_Permalink sp_Print

Hi Philip Treacy thanks for your suggestions
But I would like to point out that: What I gave you was only a test sheet and not the original.
Having said this: Thanks also for your advice that you gave me on the Factor (Dim X, Y) I always thought it was the same thing to declare the two factors by linking them together rather than dividing them all; Dora on I will make you as you suggested.
But what about? Alt Text I see it hard because they are two codes that I have never faced for here without something practical I would not know how to proceed.
However thanks again for your intervention, sincere greetings from A. Maurizio

sp_Feed
Go to top
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online: Mynda Treacy, Dieneba NDIAYE, Ben Hughes, Dario Serrati, Jay Soysa, Marco Marques, Christopher Anderson, Natasha Smith
Guest(s) 8
Currently Browsing this Page:
1 Guest(s)
Top Posters:
SunnyKow: 1432
Anders Sehlstedt: 870
Purfleet: 412
Frans Visser: 346
David_Ng: 306
lea cohen: 219
A.Maurizio: 202
Jessica Stewart: 202
Aye Mu: 201
jaryszek: 183
Newest Members:
dectator mang
Francis Drouillard
Orlando Inocente
Jovitha Clemence
Maloxat Axmatovna
Ricardo Freitas
Marko Meglic
Kelly smith
Alan Rushton
Zack Nilsson
Forum Stats:
Groups: 3
Forums: 24
Topics: 6200
Posts: 27181

 

Member Stats:
Guest Posters: 49
Members: 31858
Moderators: 3
Admins: 4
Administrators: Mynda Treacy, Philip Treacy, Catalin Bombea, FT
Moderators: MOTH Support, Velouria, Riny van Eekelen
© Simple:Press —sp_Information

Sidebar

Blog Categories

  • Excel
  • Excel Charts
  • Excel Dashboard
  • Excel Formulas
  • Excel PivotTables
  • Excel Shortcuts
  • Excel VBA
  • General Tips
  • Online Training
  • Outlook
  • Power Apps
  • Power Automate
  • Power BI
  • Power Pivot
  • Power Query
microsoft mvp logo
trustpilot excellent rating
Secured by Sucuri Badge
MyOnlineTrainingHub on YouTube Mynda Treacy on Linked In Mynda Treacy on Instagram Mynda Treacy on Twitter Mynda Treacy on Pinterest MyOnlineTrainingHub on Facebook
 

Company

  • About My Online Training Hub
  • Disclosure Statement
  • Frequently Asked Questions
  • Guarantee
  • Privacy Policy
  • Terms & Conditions
  • Testimonials
  • Become an Affiliate

Support

  • Contact
  • Forum
  • Helpdesk - For Technical Issues

Copyright © 2023 · My Online Training Hub · All Rights Reserved. Microsoft and the Microsoft Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. Product names, logos, brands, and other trademarks featured or referred to within this website are the property of their respective trademark holders.