ActiveSheet.Calculate 'perintahkan Excel untuk mengkalkulasi worksheet yang
aktif (untuk antisipasi jika file diset calculation opsi adalah manual)
lCols = Range("c1").Value     'isi variabel lcols dengan nilai dari range c1
Range("d1").Resize(, lCols).ColumnWidth = 15    'set nilai lebar kolom
dengan 15, untuk kolom mulai dari cell d1 diperlebar sebanyak lcols kolom

Wassalam,
Kid.

2012/8/20 rere Rua <[email protected]>

> **
>
>
> thanks udah bisa
> tp bisa ga di jelaskan
> klo Public Sub AturKolom() adalah fungsi
> end sub adalah akhir fungsi
> Dim lCols As Long deklarasi variable nama lCols tipe data long
> ActiveSheet.Calculate ???
> lCols = Range("c1").Value ????
> Range("d1").Resize(, lCols).ColumnWidth =
>
> mohon maaf klo banyak bertanya
>
>   ------------------------------
> *From:* Kid Mr. <[email protected]>
> *To:* [email protected]
> *Sent:* Monday, August 20, 2012 5:42 AM
>
> *Subject:* Re: [belajar-excel] select beberapa coloumb
>
>
> Setelah baris calculate beri :
> Lcols=range("c1").value
> Kid.
> On Aug 20, 2012 5:39 AM, "rere Rua" <[email protected]> wrote:
>
> **
>
>  error 1004
>
>   ------------------------------
> *From:* Kid Mr. <[email protected]>
> *To:* [email protected]
> *Sent:* Sunday, August 19, 2012 9:18 PM
> *Subject:* Re: [belajar-excel] select beberapa coloumb
>
>
> Coba prosedur berikut : (letakkan di sebuah module [di VBE -> menu Insert
> -> module])
> public sub AturKolom()
>       dim lCols as long
>       activesheet.calculate
>       range("d1").resize(,lCols).columnwidth = 12      'ganti 12 dengan
> lebar kolom yang diinginkan
>       'jika ingin hide kolom, aktifkan baris berikut dan non aktifkan
> baris di atas
>       'range("d1").resize(,lCols).entirecolumn.hidden=true   'ganti true
> menjadi false untuk meng-un-hide kolom
> end sub
>
> Wassalam,
> Kid.
>
> 2012/8/18 rere <[email protected]>
>
> **
>
>  salam teman2 mau tanya nih mis cell c1 hasil penjumlahan b1 dan a1.
> hasilnya 4. gimana caranya hasil 4 bisa langsung melakukan select otomatis
> ke coulomb d,e,f,g dan langsung merubah ukuran dari coloumb tersebut ??
>
>
>
>
>
>
>
>   
>

Kirim email ke