Results 1 to 5 of 5
  1. #1
    Star Lounger
    Join Date
    Mar 2018
    Location
    Australia
    Posts
    50
    Thanks
    23
    Thanked 0 Times in 0 Posts

    Interim Web Question

    My current Excel VBA project has nearly come to it's completion. Can do with a few tweeks, but these tweeks are more or less cosmetics.


    I do have VBA code to send to email addresses, using outlook express.

    But I have an idea to go one step further, and post certain info onto my own website in real time.

    Ok, so I know this much, I need a host and pay for it, that is not a problem.

    But the real thing is, when my VBA project is running, doing it's thing, all I need to do is from a txt file to web page, and what is in the txt file is exposed on the web page.

    How do I start to venture into that sort of thing.

    The only experience I have had with web pages is angelfire free web page maker. That's about it though, it does most of the stuff for you, point is I have some idea I will need to do some coding.

    First question is, is VBA able to get info from spreadsheet or txt file and out onto my own web page ?

    If so, are there any examples of this type of code ?

    Thanks

  2. #2
    WS Lounge VIP Lugh's Avatar
    Join Date
    Jun 2010
    Location
    Indy
    Posts
    1,421
    Thanks
    313
    Thanked 236 Times in 202 Posts
    I can't help with detail, but a couple of things which might help:

    Excel can publish directly to the web. Search for "excel to web page" or similar and you'll get lots of instructional pages and videos.

    from a txt file to web page, and what is in the txt file is exposed on the web page
    When I did some of that last decade, the technique I used was "Includes". Server-Side Includes "SSI" to be exact, which needed the text snippets uploaded to the server.

    Example: Seminar.txt would contain boilerplate like…
    Next Seminar June 27
    Speakers Fred and Wilma
    …which I'd change locally as I got new date & speaker info, then upload & replace the old Seminar.txt on the server's /Includes folder.
    Lugh.
    ~
    Dell Alienware Aurora R6; Win10 Home x64 1803; Office 365 x32
    i7-7700; GeForce GTX 1060; 16GB DDR4 2400; 2 x 256G SSD, 4TB HD

  3. The Following User Says Thank You to Lugh For This Useful Post:

    XP_7 (2018-05-22)

  4. #3
    Star Lounger
    Join Date
    Mar 2018
    Location
    Australia
    Posts
    50
    Thanks
    23
    Thanked 0 Times in 0 Posts
    Lugh
    Search for "excel to web page" or similar and you'll get lots of instructional pages and videos.
    Thanks

    Found a few things, lots to read and watch.
    Yeah, not much to say specifcally who's web page or I missed somewhere.

    So I create my very own web page, www.zyz!!123.com or net or org or whatever the case may be.
    And it's my account, me to have access to the very source a blank web page, with one of those flashing, "watch this space"
    It can sit there and do nothing till VBA sends something, and notifies "something new" via email.

    That's the goal.

  5. #4
    WS Lounge VIP Lugh's Avatar
    Join Date
    Jun 2010
    Location
    Indy
    Posts
    1,421
    Thanks
    313
    Thanked 236 Times in 202 Posts
    Quote Originally Posted by XP_7 View Post
    How do I start to venture into that sort of thing.
    1. You need a Domain Name, zyz!!123.com or net or org or whatever. You buy this from a Domain Registrar company—don't pay more than $15. I recommend Namecheap.com
    If only you will access your web content, any crazy domain name like your example will do—but make it simpler if others will need to remember or type it, ie minimize typos.

    2. You need a Webhost to provide the services [web page, database, email etc] you want to use. Again I recommend Namecheap.com, I've used them for domains & hosting for over a decade, they're very good.
    However, check out the free space your ISP probably provides, it might work for you—depends how much access they'll allow you to the space to do what you want, but my guess is it'll be enough for what you want.

    3. You need a way to access your services. The Host will send you login & Getting Started info which should be all you need for a small project. The main thing you'll need is the ability to upload a file to your web space, and that'll be doable from within the host in your browser.

    4. Create a webpage. Open a text editor like Notepad or Notepad++ & paste the following:
    Code:
    <!DOCTYPE html>
    <html>
    <head>
    <title>XP_7's Page</title>
    </head>
     
    <body>
     
    <h1>Welcome to XP_7's Page</h1>
    
    <p>Watch this space.</p>
     
    <p>This space</p>
     
    </body>
    </html>
    4a. Save this file as index.htm

    5. Upload the file to your web space. NB it's important to put it in the right folder, which will be down a couple of levels in your host's folder structure.
    On a Linux host, you must put index.htm in the /public_html folder;
    On Windows host, it's the /httpdocs folder.

    6. After about an hour, put zyz!!123.com in your browser address bar & see if your page appears. If it doesn't, try again in a few hours—it's usually less than an hour, but can take a couple of days depending on your host & ISP. [it's called "propagation" if you want to look it up]

    7. Once you see your page in your browser, change something in your local index.htm file—eg change 'this space' to 'that space'—and upload it to the same place in your webspace, overwriting the file you put there earlier.
    Now refresh your browser and confirm you see the changed page.

    If you make it this far, you have all the niggly stuff done, nice job!

    Then we can look at using SSI. If you want to read ahead:
    Wiki: Server Side Includes
    How to Include One HTML File in Another
    Server Side Includes (SSI) Primer
    Lugh.
    ~
    Dell Alienware Aurora R6; Win10 Home x64 1803; Office 365 x32
    i7-7700; GeForce GTX 1060; 16GB DDR4 2400; 2 x 256G SSD, 4TB HD

  6. The Following User Says Thank You to Lugh For This Useful Post:

    XP_7 (2018-05-22)

  7. #5
    Star Lounger
    Join Date
    Mar 2018
    Location
    Australia
    Posts
    50
    Thanks
    23
    Thanked 0 Times in 0 Posts
    4. Create a webpage. Open a text editor like Notepad or Notepad++ & paste the following:
    That I have done with angelfire back in the day. Then discovered VBA, and my project, :-)

    Thanks, I think I can do most of what's suggested, upto the uploading of things from Excel, long way to go yet, so it's the read ahead part...all good

Posting Permissions

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