Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > microsoft.public.excel.programming > #110737
| From | Claus Busch <claus_busch@t-online.de> |
|---|---|
| Newsgroups | microsoft.public.excel.programming |
| Subject | Re: Relative reference problem |
| Date | 2018-08-30 17:19 +0200 |
| Organization | A noiseless patient Spider |
| Message-ID | <pm91u2$1sd$1@dont-email.me> (permalink) |
| References | <18168fa8-24ff-469d-9cd6-d25b69bb13ca@googlegroups.com> <pm8qk4$h1k$1@dont-email.me> <23e54c31-bbf8-47eb-b26a-c3064933338c@googlegroups.com> |
Hi Norbert,
Am Thu, 30 Aug 2018 08:11:40 -0700 (PDT) schrieb Norbert:
> How do I get the active cell to be one cell further down, after I ran the code?
>
> E.g., the active cell is C46. I click on the command button. Now I want the active
> cell to be C47 (relative reference, one a cell further down than before)
try:
Private Sub CommandButton1_Click()
Dim varData As Variant
Dim myCell As Range
Set myCell = ActiveCell
With myCell
varData = Range("AG23:AR23")
.Resize(1, UBound(varData, 2)).Value = varData
Set myCell = myCell.Offset(1)
myCell.Select
End With
End Sub
Regards
Claus B.
--
Windows10
Office 2016
Back to microsoft.public.excel.programming | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Relative reference problem Norbert <nobbejagger@gmail.com> - 2018-08-30 05:59 -0700
Re: Relative reference problem Claus Busch <claus_busch@t-online.de> - 2018-08-30 15:14 +0200
Re: Relative reference problem Norbert <nobbejagger@gmail.com> - 2018-08-30 08:11 -0700
Re: Relative reference problem Claus Busch <claus_busch@t-online.de> - 2018-08-30 17:19 +0200
Re: Relative reference problem Claus Busch <claus_busch@t-online.de> - 2018-08-30 17:21 +0200
Re: Relative reference problem Norbert <nobbejagger@gmail.com> - 2018-08-31 02:41 -0700
Re: Relative reference problem GS <gs@v.invalid> - 2018-08-31 16:34 -0400
csiph-web