UC's Corner

Yussi Ariefiyono

Follow me on TwitterRSS Feeds

  • Home

Count rows in excel vb

Jun 25th

Posted by yussi ariefiyono in vb

No comments

problem:

we want to count number of rows in excel with VB

solution:

I create the sub function to count the number of rows depend on where do you want to start!

Sub countRows()
RowCount = 0
RowNext = 22  ( please change the starting row according to your need)
Do While Cells(RowNext, 3).Value <> 0 ( the “3″ also need to be changed)
RowCount = RowCount + 1
RowNext = RowNext + 1
Loop
‘MsgBox RowCount
End Sub
count, count rows, excel, rows

File in use Vb

Apr 20th

Posted by yussi ariefiyono in vb

No comments

just found nice code in internet, and i use it in one of my project. works great!
it will return the last user that open the file

Function LastUser(strPath As String) As String

‘// Code by Helen from http://www.xtremevbtalk.com/index.php?s=

‘// This routine gets the Username of the File In Use

‘// Credit goes to Helen for code & Mike for the idea

‘// Amendment 25th June 2004

‘// : Name changes will show old setting

‘// : you need to get the Len of the Name store just before

‘// : the double Padded nullstrings

Dim text As String

Dim strFlag1 As String, strflag2 As String

Dim i As Integer, j As Integer

Dim hdlFile As Long

Dim lNameLen As Byte

strFlag1 = Chr(0) & Chr(0)

strflag2 = Chr(32) & Chr(32)

hdlFile = FreeFile

Open strPath For Binary As #hdlFile

text = Space(LOF(hdlFile))

Get 1, , text

Close #hdlFile

j = InStr(1, text, strflag2)

i = InStrRev(text, strFlag1, j) + Len(strFlag1)

lNameLen = Asc(Mid(text, i – 3, 1))

LastUser = Mid(text, i, lNameLen)

End Function

file in use, username, vba

uploading the latest file to ftp with batch command

Apr 8th

Posted by yussi ariefiyono in batch command

No comments

uploading the latest file to ftp, all you need 2 .bat files

fileup.bat

@echo off

echo user USERNAME> ftpcmd.dat

echo PASSWORD>> ftpcmd.dat

echo bin>> ftpcmd.dat

echo cd REMOTEPATH >> ftpcmd.dat

echo put %1>> ftpcmd.dat

echo quit>> ftpcmd.dat

ftp -n -s:ftpcmd.dat FTPADDRESS

del ftpcmd.dat

CALL.bat

@echo off

setlocal

:source directory

set srcDir=SOURCE DIRECTORY

set lastmod=

pushd “%srcDir%”

for /f “tokens=*” %%a in (‘dir /b /od 2^>NUL’) do set lastmod=%%a

if “%lastmod%”==”" echo Could not locate files.&goto :eof

:copy

call YOURPATH\fileup.bat “%lastmod%”

:delete

del “%lastmod%”

You call the CALL.bat, and the fileup.bat is for information

batch, batch command, ftp command, ftp with batch file, windows batch command

Transfer to FTP using batch command

Apr 8th

Posted by yussi ariefiyono in batch command

No comments

there are 2 file you need

1. info of your ftp ( store it in .txt)
in my case i named it info.txt with these code written:

yourusername
yourpassword
bin
cd yourremotedirectory
bye

2. .bat file to connect to ftp and do what you want
in .bat file simply call the info.txt with this code:

ftp -s:log.txt YourFTPAddress

batch, batch command, ftp command, ftp with batch file, windows batch command

static site to CMS in 15 minutes? yes you can

Apr 8th

Posted by yussi ariefiyono in opensource

No comments

You’re probably wondering how you could possibly integrate your entire website with a CMS in just 15 minutes. The truth is, due to the recent trend of “light” content management systems, it’s becoming easier than ever to get small to mid-sized static websites up and running in them.

What is a light CMS? For the sake of this tutorial, I’m defining it as an easy-to-use, unobtrusive content management system that you don’t have to install. The nice thing about these systems is that you don’t even have to host them yourself, which is why integration takes very little time.

There are actually a handful of these CMS products available, including CushyCMS, Pagelime, andSimpleCMS. Most of these systems work off the same basic principle — you add class=”something” to almost any HTML element, link your website up to their system, and you’re done. Best of all, every one of these systems offer a free version.

Although every light CMS product has its pros and cons, I chose to work with Surreal CMS because of their vast feature set and simple interface. You’ll see exactly what I mean in just a moment, but in the meantime, here is the general process of integrating with any light CMS:

  • Create your website
  • Link it up to the CMS
  • Enable webpages
  • Add one or more editors
  • Begin editing

all in here: http://surrealcms.com/

content management system, easy cms, surrealcms
12345»10...Last »
  • Recent Posts

    • Count rows in excel vb
    • File in use Vb
    • uploading the latest file to ftp with batch command
    • Transfer to FTP using batch command
    • static site to CMS in 15 minutes? yes you can
  • Categories

    • asp.net (19)
    • batch command (3)
    • c# (1)
    • css (3)
    • flash (2)
    • friend (1)
    • Funny (4)
    • games (1)
    • google (6)
    • IE (2)
    • IE6 (2)
    • javascript (3)
    • msaccess (1)
    • network (1)
    • opensource (1)
    • SEO (1)
    • sql (5)
    • url rewriting (3)
    • vb (2)
    • vba (6)
    • yaf forum (2)
  • Archives

    • June 2010 (1)
    • April 2010 (7)
    • February 2010 (11)
    • December 2009 (2)
    • November 2009 (2)
    • September 2009 (1)
    • August 2009 (3)
    • June 2009 (2)
    • May 2009 (4)
    • April 2009 (4)
    • March 2009 (1)
    • January 2009 (1)
    • December 2008 (2)
    • August 2008 (2)
    • July 2008 (3)
    • May 2008 (4)
    • March 2008 (1)
    • January 2008 (4)
Mystique theme by digitalnature | Powered by WordPress
RSS Feeds XHTML 1.1 Top