hi,
could you tell what is wrong with my sub
Sub lw()
ActiveCell.CurrentRegion.Width
End Sub
thanks
hi,
could you tell what is wrong with my sub
Sub lw()
ActiveCell.CurrentRegion.Width
End Sub
thanks
try this
Sub lw()
Dim p As Double
p = ActiveCell.Columns.ColumnWidth
MsgBox p
End Sub
--
Gary
"EXCEL NEWS" <[email protected]> wrote in message
news:[email protected]...
>
> hi,
>
> could you tell what is wrong with my sub
>
> Sub lw()
> ActiveCell.CurrentRegion.Width
> End Sub
>
> thanks
>
>
Your Sub does nothing.
It references Width property (in points) of current region.
In order to have it return a value, you must turn it into a Function
Function lw() as Long
lw = ActiveCell.CurrentRegion.Width
End Function
Now you can use your Function from within a cell or another Sub/Function.
HTH
--
AP
"EXCEL NEWS" <[email protected]> a ecrit dans le message de news:
[email protected]...
>
> hi,
>
> could you tell what is wrong with my sub
>
> Sub lw()
> ActiveCell.CurrentRegion.Width
> End Sub
>
> thanks
>
>
Lookup STRCONV in the help files.
thanks a lot,
the sub is ok,
you neednot change it to fun,
"Ardus Petus" <[email protected]> wrote in message
news:[email protected]...
> Your Sub does nothing.
> It references Width property (in points) of current region.
>
> In order to have it return a value, you must turn it into a Function
>
> Function lw() as Long
> lw = ActiveCell.CurrentRegion.Width
> End Function
>
> Now you can use your Function from within a cell or another Sub/Function.
>
> HTH
> --
> AP
>
>
> "EXCEL NEWS" <[email protected]> a ecrit dans le message de news:
> [email protected]...
> >
> > hi,
> >
> > could you tell what is wrong with my sub
> >
> > Sub lw()
> > ActiveCell.CurrentRegion.Width
> > End Sub
> >
> > thanks
> >
> >
>
>
"EXCEL NEWS" <[email protected]> wrote in message
news:[email protected]...
> the sub is ok,
>
> you neednot change it to fun,
>
It is not it is not runnable as it stands. What are you attempting to do?
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks